]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
this test works with both one to many and many to one, but i think its intended to...
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Feb 2007 01:25:52 +0000 (01:25 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Feb 2007 01:25:52 +0000 (01:25 +0000)
test/orm/inheritance5.py

index d25d630351a59fc22f35de08821340d9b936950d..279c1d95aa0fadf23c28af55ddb01b22ef089828 100644 (file)
@@ -233,7 +233,7 @@ class RelationTest3(testbase.ORMTest):
         if usedata:
             mapper(Person, people, select_table=poly_union, polymorphic_identity='person', polymorphic_on=people.c.type,
                   properties={
-                    'colleagues':relation(Person, primaryjoin=people.c.colleague_id==people.c.person_id, remote_side=people.c.person_id, uselist=True),
+                    'colleagues':relation(Person, primaryjoin=people.c.colleague_id==people.c.person_id, remote_side=people.c.colleague_id, uselist=True),
                     'data':relation(Data, uselist=False)
                     }        
             )
@@ -241,7 +241,7 @@ class RelationTest3(testbase.ORMTest):
             mapper(Person, people, select_table=poly_union, polymorphic_identity='person', polymorphic_on=people.c.type,
                   properties={
                     'colleagues':relation(Person, primaryjoin=people.c.colleague_id==people.c.person_id, 
-                        remote_side=people.c.person_id, uselist=True)
+                        remote_side=people.c.colleague_id, uselist=True)
                     }        
             )