]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
added docstring about expire_on_commit
authorjonathan vanasco <jonathan@2xlp.com>
Thu, 14 May 2020 20:00:19 +0000 (16:00 -0400)
committerjonathan vanasco <jonathan@2xlp.com>
Thu, 14 May 2020 20:00:19 +0000 (16:00 -0400)
doc/build/errors.rst

index 599b91e2630b2cd99d1531f9de5c74d2f489e7ec..6b1b97ebb6e8ac91d6914a231f59ddc282c87062 100644 (file)
@@ -734,6 +734,11 @@ Mitigation of this error is via two general techniques:
   special directives like the :func:`.raiseload` option can ensure that
   systems don't call upon lazy loading when its not expected.
 
+Please note: the default setting of :paramref:`_sa.orm.session.Session.expire_on_commit`
+is `True`, which means SQLAlchemy will expire the instance and all loaded
+attributes when a `commit` occurs. When this happens, SQLAlchemy will need to
+query the database to refresh the instance and attributes.
+  
   .. seealso::
 
     :ref:`loading_toplevel` - detailed documentation on eager loading and other