summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-02-09 21:16:53 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-02-09 21:16:53 -0500
commitbc45fa350a02da5f24d866078abed471cd98f15b (patch)
tree2607af2197e003fdc735c020207d4f234d718fee /lib/sqlalchemy/orm/util.py
parent91f4109dc3ec49686ba2393eb6b7bd9bb5b95fb3 (diff)
downloadsqlalchemy-bc45fa350a02da5f24d866078abed471cd98f15b.tar.gz
- got m2m, local_remote_pairs, etc. working
- using new traversal that returns the product of both sides of a binary, starting to work with (a+b) == (c+d) types of joins. primaryjoins on functions working - annotations working, including reversing local/remote when doing backref
Diffstat (limited to 'lib/sqlalchemy/orm/util.py')
-rw-r--r--lib/sqlalchemy/orm/util.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py
index 0cd5b0594..f17f675f4 100644
--- a/lib/sqlalchemy/orm/util.py
+++ b/lib/sqlalchemy/orm/util.py
@@ -366,7 +366,18 @@ def _orm_annotate(element, exclude=None):
"""
return sql_util._deep_annotate(element, {'_orm_adapt':True}, exclude)
-_orm_deannotate = sql_util._deep_deannotate
+def _orm_deannotate(element):
+ """Remove annotations that link a column to a particular mapping.
+
+ Note this doesn't affect "remote" and "foreign" annotations
+ passed by the :func:`.orm.foreign` and :func:`.orm.remote`
+ annotators.
+
+ """
+
+ return sql_util._deep_deannotate(element,
+ values=("_orm_adapt", "parententity")
+ )
class _ORMJoin(expression.Join):
"""Extend Join to support ORM constructs as input."""