diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2005-09-15 02:55:16 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2005-09-15 02:55:16 +0000 |
commit | a57d576397fa57442aade954832d35ebcb68eecd (patch) | |
tree | ef34c00bc4c52fef41822ae0f224420f1aa03c7f /lib/sqlalchemy/objectstore.py | |
parent | 38a965e5a6bb7804b4e696266cfc33835cb08891 (diff) | |
download | sqlalchemy-a57d576397fa57442aade954832d35ebcb68eecd.tar.gz |
foreign key relatinoships are defined primarily at the schema level
Diffstat (limited to 'lib/sqlalchemy/objectstore.py')
-rw-r--r-- | lib/sqlalchemy/objectstore.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/objectstore.py b/lib/sqlalchemy/objectstore.py index e9365176f..aefd98123 100644 --- a/lib/sqlalchemy/objectstore.py +++ b/lib/sqlalchemy/objectstore.py @@ -24,7 +24,7 @@ import thread import sqlalchemy.util as util import weakref -def get_id_key(ident, class_, table, selectable): +def get_id_key(ident, class_, table): """returns an identity-map key for use in storing/retrieving an item from the identity map, given a tuple of the object's primary key values. @@ -37,7 +37,7 @@ def get_id_key(ident, class_, table, selectable): return value: a tuple object which is used as an identity key. """ return (class_, table, tuple(ident)) -def get_instance_key(object, class_, table, selectable): +def get_instance_key(object, class_, table, primary_keys): """returns an identity-map key for use in storing/retrieving an item from the identity map, given the object instance itself. @@ -49,8 +49,8 @@ def get_instance_key(object, class_, table, selectable): may be synonymous with the table argument or can be a larger construct containing that table. return value: a tuple object which is used as an identity key. """ - return (class_, table, tuple([getattr(object, column.key, None) for column in selectable.primary_keys])) -def get_row_key(row, class_, table, selectable): + return (class_, table, tuple([getattr(object, column.key, None) for column in primary_keys])) +def get_row_key(row, class_, table, primary_keys): """returns an identity-map key for use in storing/retrieving an item from the identity map, given a result set row. @@ -62,7 +62,7 @@ def get_row_key(row, class_, table, selectable): may be synonymous with the table argument or can be a larger construct containing that table. return value: a tuple object which is used as an identity key. """ - return (class_, table, tuple([row[column.label] for column in selectable.primary_keys])) + return (class_, table, tuple([row[column.label] for column in primary_keys])) identity_map = {} |