summaryrefslogtreecommitdiff
path: root/test/engine/reflection.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2009-01-14 20:48:01 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2009-01-14 20:48:01 +0000
commit37b7e458c201a2f7788f3db8d85bed2ab2f8e190 (patch)
tree369643daf70a7191bfab2f849386d3ecb90f92cb /test/engine/reflection.py
parent76a7818013b1803876da7f51ec1601a25cb1e78b (diff)
downloadsqlalchemy-37b7e458c201a2f7788f3db8d85bed2ab2f8e190.tar.gz
- use ForeignKey.column as _colspec source in Column._make_proxy(), preventing needless
redundant string arithmetic in memoized ForeignKey.column method - _pre_existing_column attribute becomes optional, only needed for original Table-bound column, not proxies - compare two ForeignKeys based on target_fullname, don't assume self._colspec is a string - Fixed bug when overriding a Column with a ForeignKey on a reflected table, where derived columns (i.e. the "virtual" columns of a select, etc.) would inadvertently call upon schema-level cleanup logic intended only for the original column. [ticket:1278]
Diffstat (limited to 'test/engine/reflection.py')
-rw-r--r--test/engine/reflection.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/engine/reflection.py b/test/engine/reflection.py
index 8e6a3df98..d8412237f 100644
--- a/test/engine/reflection.py
+++ b/test/engine/reflection.py
@@ -311,6 +311,8 @@ class ReflectionTest(TestBase, ComparesTables):
autoload=True)
u2 = Table('users', meta2, autoload=True)
+ s = sa.select([a2])
+ assert s.c.user_id
assert len(a2.foreign_keys) == 1
assert len(a2.c.user_id.foreign_keys) == 1
assert len(a2.constraints) == 2
@@ -328,6 +330,8 @@ class ReflectionTest(TestBase, ComparesTables):
Column('user_id', sa.Integer, sa.ForeignKey('users.id')),
autoload=True)
+ s = sa.select([a2])
+ assert s.c.user_id
assert len(a2.foreign_keys) == 1
assert len(a2.c.user_id.foreign_keys) == 1
assert len(a2.constraints) == 2