]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- put an aggressive check for "flushing object A with a collection
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Mar 2007 05:12:09 +0000 (05:12 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Mar 2007 05:12:09 +0000 (05:12 +0000)
commit7693a680edf9776d3037283f3d63e3aeeb06649e
treef8dbf41ce7b6464562a533d8eb64d89e5b824bf8
parenteb753925294a41ce63703ecd3c0891d5afc5e89d
- put an aggressive check for "flushing object A with a collection
of B's, but you put a C in the collection" error condition -
**even if C is a subclass of B**, unless B's mapper loads polymorphically.
Otherwise, the collection will later load a "B" which should be a "C"
(since its not polymorphic) which breaks in bi-directional relationships
(i.e. C has its A, but A's backref will lazyload it as a different
instance of type "B") [ticket:500]
CHANGES
lib/sqlalchemy/orm/dependency.py
lib/sqlalchemy/orm/mapper.py
test/orm/relationships.py