From e288aff8eae6d08b040ad9026449ff4578104d1b Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 23 Jun 2013 14:03:47 -0400 Subject: The resolution of :class:`.ForeignKey` objects to their target :class:`.Column` has been reworked to be as immediate as possible, based on the moment that the target :class:`.Column` is associated with the same :class:`.MetaData` as this :class:`.ForeignKey`, rather than waiting for the first time a join is constructed, or similar. This along with other improvements allows earlier detection of some foreign key configuration issues. Also included here is a rework of the type-propagation system, so that it should be reliable now to set the type as ``None`` on any :class:`.Column` that refers to another via :class:`.ForeignKey` - the type will be copied from the target column as soon as that other column is associated, and now works for composite foreign keys as well. [ticket:1765] --- test/orm/inheritance/test_basic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/orm') diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index afd63f2b4..612d6e8ca 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -2143,7 +2143,8 @@ class InhCondTest(fixtures.TestBase): assert_raises_message( sa_exc.NoReferencedColumnError, - "Could not create ForeignKey 'base.q' on table " + "Could not initialize target column for ForeignKey " + "'base.q' on table " "'derived': table 'base' has no column named 'q'", mapper, Derived, derived_table, inherits=Base -- cgit v1.2.1