diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-04-25 12:31:04 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-04-25 12:31:04 -0400 |
commit | 146fbf6d26a8c4140a47aeb03131fdf81007b9a2 (patch) | |
tree | 1441ed6b3b5c32561700c387b9ef374fced86514 | |
parent | 5016b581b6a0099b5d4babf885ae1f2c05a9589f (diff) | |
download | sqlalchemy-146fbf6d26a8c4140a47aeb03131fdf81007b9a2.tar.gz |
- add a note about versioning only applying to flushes
-rw-r--r-- | doc/build/orm/mapper_config.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/build/orm/mapper_config.rst b/doc/build/orm/mapper_config.rst index 22f483c7e..2cf61d06c 100644 --- a/doc/build/orm/mapper_config.rst +++ b/doc/build/orm/mapper_config.rst @@ -1395,6 +1395,16 @@ each time an ``UPDATE`` to the mapped table occurs. This value is checked each time the ORM emits an ``UPDATE`` or ``DELETE`` against the row to ensure that the value held in memory matches the database value. +.. warning:: + + Because the versioning feature relies upon comparison of the **in memory** + record of an object, the feature only applies to the :meth:`.Session.flush` + process, where the ORM flushes individual in-memory rows to the database. + It does **not** take effect when performing + a multirow UPDATE or DELETE using :meth:`.Query.update` or :meth:`.Query.delete` + methods, as these methods only emit an UPDATE or DELETE statement but otherwise + do not have direct access to the contents of those rows being affected. + The purpose of this feature is to detect when two concurrent transactions are modifying the same row at roughly the same time, or alternatively to provide a guard against the usage of a "stale" row in a system that might be re-using |