]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add a docs cross-reference between adding columns & relationships to existing table... 11133/head
authorJens Troeger <jens.troeger@light-speed.de>
Sun, 10 Mar 2024 19:40:58 +0000 (12:40 -0700)
committerJens Troeger <jens.troeger@light-speed.de>
Sun, 10 Mar 2024 19:40:58 +0000 (12:40 -0700)
doc/build/orm/basic_relationships.rst
doc/build/orm/declarative_tables.rst

index 0860f69fcf5b269f7d909d55f939a2bc2c642f6a..a1bdb0525c304268881bead935e949cee9f05027 100644 (file)
@@ -1102,8 +1102,10 @@ that will be passed to ``eval()`` are:
     are **evaluated as Python code expressions using eval().  DO NOT PASS
     UNTRUSTED INPUT TO THESE ARGUMENTS.**
 
+.. _orm_declarative_table_adding_relationship:
+
 Adding Relationships to Mapped Classes After Declaration
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 It should also be noted that in a similar way as described at
 :ref:`orm_declarative_table_adding_columns`, any :class:`_orm.MapperProperty`
index 4a1cbd0da3db2c157c4b3b3ac920a415e01561bd..12d7e16b969730671a0a767c0756332f1e5e8d65 100644 (file)
@@ -1158,6 +1158,10 @@ additional columns are present on mapped subclasses that have
 no :class:`.Table` of their own.  This is illustrated in the section
 :ref:`single_inheritance`.
 
+Note that in a similar fashion a :func:`_orm.relationship` can be added
+to an existing declarative table mapping as described in
+:ref:`orm_declarative_table_adding_relationship`.
+
 .. note:: Assignment of mapped
     properties to an already mapped class will only
     function correctly if the "declarative base" class is used, meaning