]> 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:48:22 +0000 (11:48 -0400)
commit023d818f21ad8ca0c9e2d46768b4986a1a9e53be
tree23e1da4db7346ebfa3a50b20e07ad591bc64fc3e
parent5f516d8455a1f6fb43e5fab9a5cd2d809f707676
- 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