Mike Bayer avatar Mike Bayer committed 7cf61c9

- changed the name to "local/remote pairs"
- added closing ' to symbol str() (I'm assuming it's supposed to be that way)

Comments (0)

Files changed (4)

lib/sqlalchemy/orm/properties.py

         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:
 
     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

lib/sqlalchemy/orm/strategies.py

         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:

lib/sqlalchemy/util.py

     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):

test/orm/relationships.py

             '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={
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.