diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-10-25 20:28:03 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-10-25 20:28:03 -0400 |
| commit | 7f043a9666eecdecc54fe779ffdd50a7d5bb0086 (patch) | |
| tree | 945a98439e89265422632d20289babbe3079f7b1 /lib/sqlalchemy/orm/query.py | |
| parent | 519c705317e801d714bd05a28f8b2786695d81cc (diff) | |
| download | sqlalchemy-7f043a9666eecdecc54fe779ffdd50a7d5bb0086.tar.gz | |
- some naming changes on PropComparator, Comparator:
1. all Comparators now have "parent" which is always the parent mapper
or AliasedClass instance
2. only RelationshipProperty.Comparator has "mapper" now, which
is the target mapper
3. The names "parententity" and "parentmapper" are underscored
also improved the message with the "neither comparator nor instruentedattribute...."
to include the classname + attribute name
Diffstat (limited to 'lib/sqlalchemy/orm/query.py')
| -rw-r--r-- | lib/sqlalchemy/orm/query.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index a6d20a973..02fb7d4f7 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -1727,7 +1727,7 @@ class Query(object): # and Class is that of the current joinpoint elif from_joinpoint and \ isinstance(onclause, interfaces.PropComparator): - left_entity = onclause.parententity + left_entity = onclause._parententity info = inspect(self._joinpoint_zero()) left_mapper, left_selectable, left_is_aliased = \ @@ -1750,7 +1750,8 @@ class Query(object): else: right_entity = onclause.property.mapper - left_entity = onclause.parententity + left_entity = onclause._parententity + assert left_entity is onclause.parent prop = onclause.property if not isinstance(onclause, attributes.QueryableAttribute): |
