diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-11-06 12:46:28 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-11-06 12:46:28 -0500 |
commit | c4a8afa4c6bf5e76c24e8ed0b5c11acc0c8904e3 (patch) | |
tree | b781b73479d60b0172bd6d1cca3c947ad1cbcff2 /test/dialect/postgresql/test_compiler.py | |
parent | dd4e09d38729c2479af19da082a07f0c44f7026c (diff) | |
download | sqlalchemy-c4a8afa4c6bf5e76c24e8ed0b5c11acc0c8904e3.tar.gz |
Move setup functionality into _register_attribute
Options like uselist and backref can be determined from
within _register_attribute based on parent_property
given; move this logic inside so that individual strategies
have less responsibility. Also don't require that
_register_attribute consider the "strategy" itself
at all; it would be better if we could no longer require
that Joined/Subquery/etc loaders call upon the "lazy" strategy
in order to initialize attribute instrumentation and
this could be done more generically.
Fixes long-standing bug where the "noload" relationship loading
strategy would cause backrefs and/or back_populates options to be
ignored. There is concern that some application that uses
"noload" might be surprised at a back-populating attribute
appearing suddenly, which may have side effects. However,
"noload" itself must be extremely seldom used since as a
strategy, it already disables loading, population of attributes
is the only behavior that is even supported, so that this issue has existed
for at least through 0.7 four years ago without ever being
reported indicates extremely low use of this option.
Change-Id: Icffb9c83ac5782b76ce882ed1df4361a1efbfba3
Fixes: #3845
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
0 files changed, 0 insertions, 0 deletions