diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-11-03 04:54:56 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-11-03 04:54:56 +0000 |
commit | cc9c615c5af8480c2a32d00a1f0d705f11676040 (patch) | |
tree | 205e58e407ae5ad1c26debcfac61b9bf4ed313b4 /test/orm/inheritance/test_basic.py | |
parent | 659ca0c5088b2b6dcd66e33bb9aff79aaffc421a (diff) | |
download | sqlalchemy-cc9c615c5af8480c2a32d00a1f0d705f11676040.tar.gz |
- Fixed the call to get_committed_value() on CompositeProperty.
[ticket:1504]
Diffstat (limited to 'test/orm/inheritance/test_basic.py')
-rw-r--r-- | test/orm/inheritance/test_basic.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index a682d38cb..99c6bf6bd 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -101,6 +101,19 @@ class FalseDiscriminatorTest(_base.MappedTest): assert d1.type is False sess.expunge_all() assert sess.query(Ding).one() is not None + + def test_none_on_sub(self): + class Ding(object):pass + class Bat(Ding):pass + mapper(Ding, t1, polymorphic_on=t1.c.type, polymorphic_identity=False) + mapper(Bat, inherits=Ding, polymorphic_identity=True) + sess = create_session() + d1 = Ding() + sess.add(d1) + sess.flush() + assert d1.type is False + sess.expunge_all() + assert sess.query(Ding).one() is not None class PolymorphicSynonymTest(_base.MappedTest): @classmethod |