summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-07-19 06:04:31 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-07-19 06:04:31 +0000
commitbb188d2cce7ff380f8e5bfdf934bba694c6dcf20 (patch)
treefabbce33e09cc18443aa10dcb9590386edb9a83b
parente98e878646c809d466ff8cfb256022798e574fb4 (diff)
downloadsqlalchemy-bb188d2cce7ff380f8e5bfdf934bba694c6dcf20.tar.gz
failing test case re: compilation
-rw-r--r--test/orm/polymorph.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/orm/polymorph.py b/test/orm/polymorph.py
index 232bc5711..34b7ddde2 100644
--- a/test/orm/polymorph.py
+++ b/test/orm/polymorph.py
@@ -103,7 +103,28 @@ class MultipleTableTest(testbase.PersistTest):
print session.query(Engineer).select()
print session.query(Person).select()
+
+ def testcompile2(self):
+ """this test fails. mapper compilation completely doesnt work for this right now and likely
+ needs to be rewritten again."""
+ person_join = polymorphic_union( {
+ 'engineer':people.join(engineers),
+ 'manager':people.join(managers),
+ 'person':people.select(people.c.type=='person'),
+ }, None, 'pjoin')
+
+ person_mapper = mapper(Person, people, select_table=person_join, polymorphic_on=person_join.c.type,
+ polymorphic_identity='person',
+ properties = dict(managers = relation(Manager, lazy=True))
+ )
+
+ mapper(Engineer, engineers, inherits=person_mapper, polymorphic_identity='engineer')
+ mapper(Manager, managers, inherits=person_mapper, polymorphic_identity='manager')
+
+ #person_mapper.compile()
+ class_mapper(Manager).compile()
+
def do_test(self, include_base=False, lazy_relation=True, redefine_colprop=False):
"""tests the polymorph.py example, with several options: