From: Mike Bayer Date: Fri, 24 Feb 2006 16:54:30 +0000 (+0000) Subject: get() method needs to use the full table, not just the 'primary' table, to get the... X-Git-Tag: rel_0_1_3~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cf436263e080fea3cd9100d838c9e76f6691189;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git get() method needs to use the full table, not just the 'primary' table, to get the full list of primary key cols --- diff --git a/lib/sqlalchemy/mapping/mapper.py b/lib/sqlalchemy/mapping/mapper.py index 72b796f272..61d9a3c2ef 100644 --- a/lib/sqlalchemy/mapping/mapper.py +++ b/lib/sqlalchemy/mapping/mapper.py @@ -274,7 +274,7 @@ class Mapper(object): ident = key[2] i = 0 params = {} - for primary_key in self.pks_by_table[self.primarytable]: + for primary_key in self.pks_by_table[self.table]: params["pk_"+primary_key.key] = ident[i] i += 1 try: