]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- attributes now has an "active_history" flag. This flag indicates that when new...
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 22 Aug 2008 15:09:27 +0000 (15:09 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 22 Aug 2008 15:09:27 +0000 (15:09 +0000)
commitc03b6c2e41f309b122e300b2625a9f744ad690b8
tree48d2c99e5dfc33a426871ca5af84a9b5f9738d6b
parent3c80e59ebce9ae404b092011dce70598b563ff23
- attributes now has an "active_history" flag.  This flag indicates that when new value is set or the existing value is deleted, we absolutely need the previous value to be present, including if it requires hitting a lazy loader.  Since somewhere around 0.4 we had not been loading the previous value as a performance optimization.
- the flag is set by a ColumnLoader which contains a primary key column.  This allows the mapper to have an accurate record of a primary key column when _save_obj() performs an UPDATE.
- the definition of who gets "active_history" may be expanded to include ForeignKey and any columns participating in a primaryjoin/seconddary join, so that lazyloaders can execute correctly on an expired object with pending changes to those attributes.
- expire-on-commit is why this is becoming a more important issue as of late
- fixes [ticket:1151], but unit tests, CHANGES note is pending
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/strategies.py