]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Modified the behavior of :func:`.orm.load_only` such that primary key
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 12 Jun 2014 15:47:50 +0000 (11:47 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 12 Jun 2014 15:47:50 +0000 (11:47 -0400)
commit33cb84945f5277a3cf090b73b218abc583d292fc
tree07b9097918447cb2fa26a32e1f998c92e53c2498
parentbd9c325852bf80ce5e8392b5a5a556fa15c09a36
- Modified the behavior of :func:`.orm.load_only` such that primary key
columns are always added to the list of columns to be "undeferred";
otherwise, the ORM can't load the row's identity.   Apparently,
one can defer the mapped primary keys and the ORM will fail, that
hasn't been changed.  But as load_only is essentially saying
"defer all but X", it's more critical that PK cols not be part of this
deferral. fixes #3080
doc/build/changelog/changelog_09.rst
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/strategy_options.py
test/orm/test_deferred.py