[Checkins] SVN: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/mapper.py
removced primary_key suppot
Andreas Jung
andreas at andreas-jung.com
Sat Apr 28 12:29:42 EDT 2007
Log message for revision 74882:
removced primary_key suppot
Changed:
U z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/mapper.py
-=-
Modified: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/mapper.py
===================================================================
--- z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/mapper.py 2007-04-28 15:32:23 UTC (rev 74881)
+++ z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/mapper.py 2007-04-28 16:29:41 UTC (rev 74882)
@@ -141,23 +141,12 @@
# add the mapper as relation to the properties dict
properties[table_refname] = relation(table_ref_mapper)
-
- # pre-configured primary_key parameter?
- primary_key = self._model.get(name, {}).get('primary_key', None)
-
- if isinstance(primary_key, (list, tuple)):
- # The 'primary_key' hint is configured as a list/tuple of
- # column names. However the mapper() method requires
- # a sequence of the related Column() instances
- primary_key = [getattr(table.c, pk) for pk in primary_key]
-
# create a mapper and cache it
if mapper_class and mapper_class.__dict__.has_key('c'):
mapper = mapper_class
else:
mapper = self._mapper_factory(table,
properties=properties,
- primary_key=primary_key,
cls=mapper_class)
self._registerMapper(mapper, name)
More information about the Checkins
mailing list