]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Moving an o2m object from one collection to
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 22 Jul 2010 05:46:41 +0000 (01:46 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 22 Jul 2010 05:46:41 +0000 (01:46 -0400)
commitca9029ca9830573c4a5618e5dc01347576d50eb4
tree680c7622154346c21523c69a0d932a9a91146c24
parent5b91f627a4e5db44c45254f0cb32ac10d0dfabd0
- Moving an o2m object from one collection to
another, or vice versa changing the referenced
object by an m2o, where the foreign key is also a
member of the primary key, will now be more
carefully checked during flush if the change in
value of the foreign key on the "many" side is the
result of a change in the primary key of the "one"
side, or if the "one" is just a different object.
In one case, a cascade-capable DB would have
cascaded the value already and we need to look at
the "new" PK value to do an UPDATE, in the other we
need to continue looking at the "old". We now look
at the "old", assuming passive_updates=True,
unless we know it was a PK switch that
triggered the change. [ticket:1856]
CHANGES
lib/sqlalchemy/orm/dependency.py
lib/sqlalchemy/orm/sync.py
test/orm/test_naturalpks.py