]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support hybrids/composites with bulk updates
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 22 Mar 2017 16:56:23 +0000 (12:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 22 Mar 2017 21:44:56 +0000 (17:44 -0400)
commit1fcbc17b7dd5a5cad71ee79441aa3293c00b8877
treec87cb20c6fd7a9b6220b1cb3f27faac7d6d03261
parent28edc2604a96d5ecd8318232c95a034433aa07d1
Support hybrids/composites with bulk updates

The :meth:`.Query.update` method can now accommodate both
hybrid attributes as well as composite attributes as a source
of the key to be placed in the SET clause.   For hybrids, an
additional decorator :meth:`.hybrid_property.update_expression`
is supplied for which the user supplies a tuple-returning function.

Change-Id: I15e97b02381d553f30b3301308155e19128d2cfb
Fixes: #3229
12 files changed:
doc/build/changelog/changelog_12.rst
doc/build/changelog/migration_12.rst
doc/build/orm/composites.rst
lib/sqlalchemy/ext/hybrid.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/testing/assertions.py
test/ext/test_hybrid.py
test/orm/test_composites.py
test/orm/test_update_delete.py