summaryrefslogtreecommitdiff
path: root/test/orm/eager_relations.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-05-06 00:55:49 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-05-06 00:55:49 +0000
commit538861143f66e7299f60b42a505242edd6351908 (patch)
tree8c93c7afbd43da67e871cac3ca01a934148b8f9d /test/orm/eager_relations.py
parenta9ff52f18b3295131113ad5fb65fd3b49a23e8fe (diff)
downloadsqlalchemy-538861143f66e7299f60b42a505242edd6351908.tar.gz
- _Label adds itself to the proxy collection so that it works in correspoinding column. fixes some eager load with column_property bugs.
- this partially fixes some issues in [ticket:1022] but leaving the "unlabeled" fix for 0.5 for now
Diffstat (limited to 'test/orm/eager_relations.py')
-rw-r--r--test/orm/eager_relations.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/test/orm/eager_relations.py b/test/orm/eager_relations.py
index 866eec718..418df83dd 100644
--- a/test/orm/eager_relations.py
+++ b/test/orm/eager_relations.py
@@ -1047,14 +1047,16 @@ class SubqueryTest(ORMTest):
self.assertEquals(user.query_score, user.prop_score)
self.assert_sql_count(testing.db, go, 1)
- u = session.query(User).filter_by(name='joe').one()
- self.assertEquals(u.query_score, u.prop_score)
-
- # fails:
- #def go():
- # u = session.query(User).filter_by(name='joe').one()
- # self.assertEquals(u.query_score, u.prop_score)
- #self.assert_sql_count(testing.db, go, 1)
+
+ # fails for non labeled (fixed in 0.5):
+ if labeled:
+ def go():
+ u = session.query(User).filter_by(name='joe').one()
+ self.assertEquals(u.query_score, u.prop_score)
+ self.assert_sql_count(testing.db, go, 1)
+ else:
+ u = session.query(User).filter_by(name='joe').one()
+ self.assertEquals(u.query_score, u.prop_score)
for t in (tags_table, users_table):
t.delete().execute()