From b5e1cb2861637c122d0cc133f746d5c337ddb006 Mon Sep 17 00:00:00 2001 From: jonathan vanasco Date: Wed, 8 Sep 2021 13:27:20 -0400 Subject: [PATCH] References: #5831 Add a note to docs regarding future session under asyncio Change-Id: Ib152be833dcb8ea46217e761a715f639859133c6 --- doc/build/orm/extensions/asyncio.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/build/orm/extensions/asyncio.rst b/doc/build/orm/extensions/asyncio.rst index c5fc356d12..98f16932c8 100644 --- a/doc/build/orm/extensions/asyncio.rst +++ b/doc/build/orm/extensions/asyncio.rst @@ -226,6 +226,16 @@ then used in a Python asynchronous context manager (i.e. ``async with:`` statement) so that it is automatically closed at the end of the block; this is equivalent to calling the :meth:`_asyncio.AsyncSession.close` method. +.. note:: :class:`_asyncio.AsyncSession` uses SQLAlchemy's future mode, which + has several potentially breaking changes. One such change is the new + default behavior of ``cascade_backrefs`` is ``False``, which may affect + how related objects are saved to the database. + + .. seealso:: + + :ref:`change_5150` + + .. _asyncio_orm_avoid_lazyloads: Preventing Implicit IO when Using AsyncSession -- 2.47.2