From 2dc05f0c35f1b23168e65414d05ab275b0914f38 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 28 Oct 2022 11:40:39 -0400 Subject: [PATCH] restructure dragon to alleviate ambiguity dragons are eye catching so let's make sure the dragon is very specific about what it's referring towards Change-Id: I2faaef2352c7984d4c1c7d599849a9179a1e7776 References: #8732 --- doc/build/orm/declarative_tables.rst | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/build/orm/declarative_tables.rst b/doc/build/orm/declarative_tables.rst index d1d45178d1..475813f819 100644 --- a/doc/build/orm/declarative_tables.rst +++ b/doc/build/orm/declarative_tables.rst @@ -622,11 +622,16 @@ adding a ``FOREIGN KEY`` constraint as well as substituting FOREIGN KEY(id) REFERENCES parent (id) ) -.. note:: The above feature of :func:`_orm.mapped_column` can in theory - work for other constructs as well such as :func:`_orm.relationship` and - :func:`_orm.composite`. At the moment, these other use cases are not - implemented and raise a ``NotImplementedError``, but may be implemented - in future releases. +.. note:: The feature of :func:`_orm.mapped_column` just described, where + a fully constructed set of column arguments may be indicated using + :pep:`593` ``Annotated`` objects that contain a "template" + :func:`_orm.mapped_column` object to be copied into the attribute, is + currently not implemented for other ORM constructs such as + :func:`_orm.relationship` and :func:`_orm.composite`. While this functionality + is in theory possible, for the moment attempting to use ``Annotated`` + to indicate further arguments for :func:`_orm.relationship` and similar + will raise a ``NotImplementedError`` exception at runtime, but + may be implemented in future releases. Dataclass features in ``mapped_column()`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.47.2