summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/properties.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-07-16 17:29:02 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-07-16 17:29:02 -0400
commitce9a702dbd52946487f45b98ef20d1b7783facb6 (patch)
tree7273a1982850bf9975509295d766053d4fe822b1 /lib/sqlalchemy/orm/properties.py
parent1dc09bf6ede97ef08b2c8c0886a03b44bba735ff (diff)
downloadsqlalchemy-ce9a702dbd52946487f45b98ef20d1b7783facb6.tar.gz
- express most of the orm.util functions in terms of the inspection system
- modify inspection system: 1. raise a new exception for any case where the inspection context can't be returned. this supersedes the "not mapped" errors. 2. don't configure mappers on a mapper inspection. this allows the inspectors to be used during mapper config time. instead, the mapper configures on "with_polymorphic_selectable" now, which is needed for all queries - add a bunch of new "is_XYZ" attributes to inspectors - finish making the name change of "compile" -> "configure", for some reason this was only done partially
Diffstat (limited to 'lib/sqlalchemy/orm/properties.py')
-rw-r--r--lib/sqlalchemy/orm/properties.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index efad54839..6b1dd6462 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -886,7 +886,7 @@ class RelationshipProperty(StrategizedProperty):
def _add_reverse_property(self, key):
- other = self.mapper.get_property(key, _compile_mappers=False)
+ other = self.mapper.get_property(key, _configure_mappers=False)
self._reverse_property.add(other)
other._reverse_property.add(self)
@@ -912,7 +912,7 @@ class RelationshipProperty(StrategizedProperty):
"""
if isinstance(self.argument, type):
mapper_ = mapper.class_mapper(self.argument,
- compile=False)
+ configure=False)
elif isinstance(self.argument, mapper.Mapper):
mapper_ = self.argument
elif util.callable(self.argument):
@@ -921,7 +921,7 @@ class RelationshipProperty(StrategizedProperty):
# configurational schemes
mapper_ = mapper.class_mapper(self.argument(),
- compile=False)
+ configure=False)
else:
raise sa_exc.ArgumentError("relationship '%s' expects "
"a class or a mapper argument (received: %s)"
@@ -1037,7 +1037,7 @@ class RelationshipProperty(StrategizedProperty):
if not self.is_primary() \
and not mapper.class_mapper(
self.parent.class_,
- compile=False).has_property(self.key):
+ configure=False).has_property(self.key):
raise sa_exc.ArgumentError("Attempting to assign a new "
"relationship '%s' to a non-primary mapper on "
"class '%s'. New relationships can only be added "