From: Mike Bayer Date: Sun, 8 Jan 2006 01:35:29 +0000 (+0000) Subject: small adjust after mapper/sql overhaul X-Git-Tag: rel_0_1_0~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8a90dc0a1237412bad1eddaa43911f64130018d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git small adjust after mapper/sql overhaul --- diff --git a/test/mapper.py b/test/mapper.py index 72c062016a..412166b862 100644 --- a/test/mapper.py +++ b/test/mapper.py @@ -122,7 +122,7 @@ class MapperTest(MapperSuperTest): def testfunction(self): """tests mapping to a SELECT statement that has functions in it.""" s = select([users, (users.c.user_id * 2).label('concat'), func.count(addresses.c.address_id).label('count')], - users.c.user_id==addresses.c.user_id, group_by=[c for c in users.c]) + users.c.user_id==addresses.c.user_id, group_by=[c for c in users.c]).alias('myselect') m = mapper(User, s, primarytable=users) print [c.key for c in m.c] l = m.select() diff --git a/test/objectstore.py b/test/objectstore.py index 634930b52c..6ddabafce4 100644 --- a/test/objectstore.py +++ b/test/objectstore.py @@ -181,6 +181,8 @@ class SaveTest(AssertMixin): """tests a save of an object where each instance spans two tables. also tests redefinition of the keynames for the column properties.""" usersaddresses = sql.join(users, addresses, users.c.user_id == addresses.c.user_id) + print usersaddresses._get_col_by_original(users.c.user_id) + print repr(usersaddresses._orig_cols) m = mapper(User, usersaddresses, primarytable = users, properties = dict( email = addresses.c.email_address,