summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/orm/properties.py15
-rw-r--r--lib/sqlalchemy/orm/strategies.py2
-rw-r--r--lib/sqlalchemy/util.py2
-rw-r--r--test/orm/relationships.py2
4 files changed, 11 insertions, 10 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index fb10357cf..a171923fe 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -590,9 +590,9 @@ class PropertyLoader(StrategizedProperty):
else:
self.secondary_synchronize_pairs = None
- def equated_pairs(self):
+ def local_remote_pairs(self):
return zip(self.local_side, self.remote_side)
- equated_pairs = property(equated_pairs)
+ local_remote_pairs = property(local_remote_pairs)
def __determine_remote_side(self):
if self.remote_side:
@@ -667,11 +667,12 @@ class PropertyLoader(StrategizedProperty):
def _post_init(self):
if logging.is_info_enabled(self.logger):
- self.logger.info(str(self) + " setup primary join " + str(self.primaryjoin))
- self.logger.info(str(self) + " setup secondary join " + str(self.secondaryjoin))
- self.logger.info(str(self) + " synchronize pairs " + ",".join(["(%s => %s)" % (l, r) for l, r in self.synchronize_pairs]))
- self.logger.info(str(self) + " equated pairs " + ",".join(["(%s == %s)" % (l, r) for l, r in self.equated_pairs]))
- self.logger.info(str(self) + " relation direction " + (self.direction is ONETOMANY and "one-to-many" or (self.direction is MANYTOONE and "many-to-one" or "many-to-many")))
+ self.logger.info(str(self) + " setup primary join %s" % self.primaryjoin)
+ self.logger.info(str(self) + " setup secondary join %s" % self.secondaryjoin)
+ self.logger.info(str(self) + " synchronize pairs [%s]" % ",".join(["(%s => %s)" % (l, r) for l, r in self.synchronize_pairs]))
+ self.logger.info(str(self) + " secondary synchronize pairs [%s]" % ",".join(["(%s => %s)" % (l, r) for l, r in self.secondary_synchronize_pairs or []]))
+ self.logger.info(str(self) + " local/remote pairs [%s]" % ",".join(["(%s / %s)" % (l, r) for l, r in self.local_remote_pairs]))
+ self.logger.info(str(self) + " relation direction %s" % self.direction)
if self.uselist is None and self.direction is MANYTOONE:
self.uselist = False
diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py
index 6bd0d530f..e4c85b5d7 100644
--- a/lib/sqlalchemy/orm/strategies.py
+++ b/lib/sqlalchemy/orm/strategies.py
@@ -354,7 +354,7 @@ class LazyLoader(AbstractRelationLoader):
equated_columns = {}
secondaryjoin = prop.secondaryjoin
- equated = dict(prop.equated_pairs)
+ equated = dict(prop.local_remote_pairs)
def should_bind(targetcol, othercol):
if reverse_direction and not secondaryjoin:
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py
index 101ef1462..ceabb39eb 100644
--- a/lib/sqlalchemy/util.py
+++ b/lib/sqlalchemy/util.py
@@ -1026,7 +1026,7 @@ class _symbol(object):
def __reduce__(self):
return symbol, (self.name,)
def __repr__(self):
- return "<symbol '%s>" % self.name
+ return "<symbol '%s'>" % self.name
_symbol.__name__ = 'symbol'
class symbol(object):
diff --git a/test/orm/relationships.py b/test/orm/relationships.py
index 6583e5584..89fd86f27 100644
--- a/test/orm/relationships.py
+++ b/test/orm/relationships.py
@@ -973,7 +973,7 @@ class InvalidRelationEscalationTest(ORMTest):
'foos':relation(Foo, primaryjoin=foos.c.id>foos.c.fid, viewonly=True, foreign_keys=[foos.c.fid])
})
compile_mappers()
- self.assertEquals(Foo.foos.property.equated_pairs, [(foos.c.id, foos.c.fid)])
+ self.assertEquals(Foo.foos.property.local_remote_pairs, [(foos.c.id, foos.c.fid)])
def test_equated(self):
mapper(Foo, foos, properties={