summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/mapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-08-19 11:12:41 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2022-08-19 11:12:41 -0400
commite7b2055866f315a77e1e19a832a5afdae90bfd9f (patch)
tree17913135055ec5ff0eb8f0e1010452093ac7de41 /lib/sqlalchemy/orm/mapper.py
parent319e5a3d8e92ccc97faeeaecd55313131e5a611b (diff)
downloadsqlalchemy-e7b2055866f315a77e1e19a832a5afdae90bfd9f.tar.gz
remove narrative "reconstructor" document
this event hook is not commonly used and this page does not fit into the current narrative very well. We should possibly write a new paragraph regarding how instances load at some point though the best place to put it is not clear.
Diffstat (limited to 'lib/sqlalchemy/orm/mapper.py')
-rw-r--r--lib/sqlalchemy/orm/mapper.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index 61c982029..b4aee545e 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -3818,6 +3818,12 @@ def reconstructor(fn):
method that will be called by the ORM after the instance has been
loaded from the database or otherwise reconstituted.
+ .. tip::
+
+ The :func:`_orm.reconstructor` decorator makes use of the
+ :meth:`_orm.InstanceEvents.load` event hook, which can be
+ used directly.
+
The reconstructor will be invoked with no arguments. Scalar
(non-collection) database-mapped attributes of the instance will
be available for use within the function. Eagerly-loaded
@@ -3828,8 +3834,6 @@ def reconstructor(fn):
.. seealso::
- :ref:`mapping_constructors`
-
:meth:`.InstanceEvents.load`
"""