diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-05-06 00:55:49 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-05-06 00:55:49 +0000 |
commit | 538861143f66e7299f60b42a505242edd6351908 (patch) | |
tree | 8c93c7afbd43da67e871cac3ca01a934148b8f9d /test/sql/selectable.py | |
parent | a9ff52f18b3295131113ad5fb65fd3b49a23e8fe (diff) | |
download | sqlalchemy-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/sql/selectable.py')
-rwxr-xr-x | test/sql/selectable.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/sql/selectable.py b/test/sql/selectable.py index d3b639767..b29ba8d5c 100755 --- a/test/sql/selectable.py +++ b/test/sql/selectable.py @@ -174,6 +174,15 @@ class SelectableTest(TestBase, AssertsExecutionResults): print str(j) self.assert_(criterion.compare(j.onclause)) + def test_labeled_select_correspoinding(self): + l1 = select([func.max(table.c.col1)]).label('foo') + + s = select([l1]) + assert s.corresponding_column(l1).name == s.c.foo + + s = select([table.c.col1, l1]) + assert s.corresponding_column(l1).name == s.c.foo + def testselectaliaslabels(self): a = table2.select(use_labels=True).alias('a') print str(a.select()) |