[Checkins] SVN: z3c.dobbin/trunk/src/z3c/dobbin/mapper.py Refactoring; updated syntax to SQLAlchemy 0.5.

Malthe Borch cvs-admin at zope.org
Fri Jun 13 12:54:58 EDT 2008


Log message for revision 87369:
  Refactoring; updated syntax to SQLAlchemy 0.5.

Changed:
  U   z3c.dobbin/trunk/src/z3c/dobbin/mapper.py

-=-
Modified: z3c.dobbin/trunk/src/z3c/dobbin/mapper.py
===================================================================
--- z3c.dobbin/trunk/src/z3c/dobbin/mapper.py	2008-06-13 16:20:39 UTC (rev 87368)
+++ z3c.dobbin/trunk/src/z3c/dobbin/mapper.py	2008-06-13 16:51:48 UTC (rev 87369)
@@ -63,7 +63,7 @@
             field.__name__: relation,
             relation.name: orm.relation(
             bootstrap.Soup,
-            primaryjoin=(field.schema.__mapper__.c.uuid==column),
+            primaryjoin=(field.schema.__mapper__.uuid==column),
             foreign_keys=[column],
             enable_typechecks=False,
             lazy=True)
@@ -187,13 +187,13 @@
     # create joined table
     soup_table = table = metadata.tables['soup']
     properties = {}
-    table = None
+    first_table = None
     
     for (t, p) in (getTable(iface, metadata, ignore) for iface in ifaces):
-        if table is None:
-            first_table = table = t
+        if first_table is None:
+            table = first_table = t
         else:
-            table = rdb.join(table, t, onclause=(t.c.id==first_table.c.id))
+            table = table.join(t, onclause=(t.c.id==first_table.c.id))
         properties.update(p)
 
     specification_path = '%s.%s' % (spec.__module__, spec.__name__)



More information about the Checkins mailing list