summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-10-20 12:50:53 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-10-25 12:09:41 -0400
commit92aa35e7fc737de58c25d6c22bf1c48f6c4c714b (patch)
treef3c46d6d198441bb7f8ca7e8a7b2322b26491782 /lib/sqlalchemy/ext
parent605d0d905855684bfe4409532af98f336ae38f82 (diff)
downloadsqlalchemy-92aa35e7fc737de58c25d6c22bf1c48f6c4c714b.tar.gz
deprecation warnings: strings in loader options, join, with_parent
Repairs one in-library deprecation warning regarding mapper propagation of options raises maxfail to 250, as 25 is too low when we are trying to address many errors at once. the 25 was originally due to the fact that our fixtures would be broken after that many failures in most cases, which today should not be the case nearly as often. Change-Id: I26affddf42e2cae2aaf9561633e9b8cd431eb189
Diffstat (limited to 'lib/sqlalchemy/ext')
-rw-r--r--lib/sqlalchemy/ext/associationproxy.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py
index 411033a6b..dd5c10ac9 100644
--- a/lib/sqlalchemy/ext/associationproxy.py
+++ b/lib/sqlalchemy/ext/associationproxy.py
@@ -472,10 +472,23 @@ class AssociationProxyInstance(object):
def attr(self):
"""Return a tuple of ``(local_attr, remote_attr)``.
- This attribute is convenient when specifying a join
- using :meth:`_query.Query.join` across two relationships::
+ This attribute was originally intended to facilitate using the
+ :meth:`_query.Query.join` method to join across the two relationships
+ at once, however this makes use of a deprecated calling style.
+
+ To use :meth:`_sql.select.join` or :meth:`_orm.Query.join` with
+ an association proxy, the current method is to make use of the
+ :attr:`.AssociationProxyInstance.local_attr` and
+ :attr:`.AssociationProxyInstance.remote_attr` attributes separately::
+
+ stmt = (
+ select(Parent).
+ join(Parent.proxied.local_attr).
+ join(Parent.proxied.remote_attr)
+ )
- sess.query(Parent).join(*Parent.proxied.attr)
+ A future release may seek to provide a more succinct join pattern
+ for association proxy attributes.
.. seealso::