diff options
| author | Luke Cyca <me@lukecyca.com> | 2013-03-07 11:56:11 -0800 |
|---|---|---|
| committer | Luke Cyca <me@lukecyca.com> | 2013-03-07 11:56:11 -0800 |
| commit | f122a307e03d9a1f2322b35429972a5f928d5b30 (patch) | |
| tree | 7eed4eee764516a8310ac5bf6e3a78639b6cb295 /test/sql/test_compiler.py | |
| parent | 3b7fbdb2962439438c38e972843d3c8ef05eb216 (diff) | |
| download | sqlalchemy-f122a307e03d9a1f2322b35429972a5f928d5b30.tar.gz | |
Changed behavior of Select.correlate() to ignore correlations to froms that don't exist in the superquery.
Diffstat (limited to 'test/sql/test_compiler.py')
| -rw-r--r-- | test/sql/test_compiler.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 3b8aed23f..22fecf665 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -451,7 +451,11 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): # intentional again s = s.correlate(t, t2) s2 = select([t, t2, s]) - self.assert_compile(s, "SELECT t.a WHERE t.a = t2.d") + self.assert_compile( + s2, + "SELECT t.a, t.b, t2.c, t2.d, a " + "FROM t, t2, (SELECT t.a AS a WHERE t.a = t2.d)" + ) def test_exists(self): s = select([table1.c.myid]).where(table1.c.myid == 5) @@ -3315,4 +3319,4 @@ class ResultMapTest(fixtures.TestBase): ) is_( comp.result_map['t1_a'][1][2], t1.c.a - )
\ No newline at end of file + ) |
