]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Squeezed a few more unnecessary "lazy loads" out of
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Jul 2009 01:46:41 +0000 (01:46 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Jul 2009 01:46:41 +0000 (01:46 +0000)
commit306c901946da9b06e79171c167a454cf0550b11d
tree6e7fba46d9aac79f332f1a23c6c4a5aa88684040
parent05a82671c37b778f091e2a15266a1867428f3fdb
- Squeezed a few more unnecessary "lazy loads" out of
relation().  When a collection is mutated, many-to-one
backrefs on the other side will not fire off to load
the "old" value, unless "single_parent=True" is set.
A direct assignment of a many-to-one still loads
the "old" value in order to update backref collections
on that value, which may be present in the session
already, thus maintaining the 0.5 behavioral contract.
[ticket:1483]
CHANGES
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/dynamic.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/unitofwork.py
test/orm/test_backref_mutations.py [new file with mode: 0644]