Vous avez des améliorations (ou des corrections) à proposer pour ce document :
je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Represent the ORM mapped attribute type for a "dynamic" relationship.
The :class:`_orm.DynamicMapped` type annotation may be used in an
:ref:`Annotated Declarative Table <orm_declarative_mapped_column>` mapping
to indicate that the ``lazy="dynamic"`` loader strategy should be used
for a particular :func:`_orm.relationship`.
.. legacy:: The "dynamic" lazy loader strategy is the legacy form of what
is now the "write_only" strategy described in the section
:ref:`write_only_relationship`.
E.g.::
class User(Base):
__tablename__ = "user"
id: Mapped[int] = mapped_column(primary_key=True)
addresses: DynamicMapped[Address] = relationship(
cascade="all,delete-orphan"
)
See the section :ref:`dynamic_relationship` for background.
.. versionadded:: 2.0
.. seealso::
:ref:`dynamic_relationship` - complete background
:class:`.WriteOnlyMapped` - fully 2.0 style version
Améliorations / Corrections
Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Emplacement :
Description des améliorations :