From 2e5c8913a8e15e649322c0907199361df9698153 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 1 Apr 2014 13:03:52 -0400 Subject: - Fixes to the newly enhanced boolean coercion in :ticket:`2804` where the new rules for "where" and "having" woudn't take effect for the "whereclause" and "having" kw arguments of the :func:`.select` construct, which is also what :class:`.Query` uses so wasn't working in the ORM either. fixes #3013 re: #2804 --- lib/sqlalchemy/sql/selectable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql/selectable.py') diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index f64a70ec8..2ce164445 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -2191,12 +2191,12 @@ class Select(HasPrefixes, GenerativeSelect): self._raw_columns = [] if whereclause is not None: - self._whereclause = _literal_as_text(whereclause) + self._whereclause = and_(True_._singleton(), whereclause) else: self._whereclause = None if having is not None: - self._having = _literal_as_text(having) + self._having = and_(True_._singleton(), having) else: self._having = None -- cgit v1.2.1