summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-09-15 20:18:26 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-09-15 20:18:26 -0400
commit9fae11e38caa3841f20e951f7ff2c5e8f5d09383 (patch)
treea65570e675eaac138fd1b4ba91b0f4f411a80a11 /lib/sqlalchemy/orm/util.py
parent40ffa5a8046e95e6c149c90e8cf7408b99e33c46 (diff)
downloadsqlalchemy-9fae11e38caa3841f20e951f7ff2c5e8f5d09383.tar.gz
- Fixed a variety of synonym()-related regressions
from 0.6: - making a synonym against a synonym now works. - synonyms made against a relationship() can be passed to query.join(), options sent to query.options(), passed by name to query.with_parent(). - revised the approach taken earlier to just propagate "property" out from the proxied attr the same way queryable attribute does.
Diffstat (limited to 'lib/sqlalchemy/orm/util.py')
-rw-r--r--lib/sqlalchemy/orm/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py
index d7c8b20a2..4708852ea 100644
--- a/lib/sqlalchemy/orm/util.py
+++ b/lib/sqlalchemy/orm/util.py
@@ -459,7 +459,7 @@ def with_parent(instance, prop):
"""
if isinstance(prop, basestring):
mapper = object_mapper(instance)
- prop = mapper.get_property(prop)
+ prop = getattr(mapper.class_, prop).property
elif isinstance(prop, attributes.QueryableAttribute):
prop = prop.property