]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add a docs cross-reference between adding columns & relationships to existing table...
authorJens Troeger <jens.troeger@light-speed.de>
Mon, 11 Mar 2024 21:11:45 +0000 (17:11 -0400)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 11 Mar 2024 21:15:24 +0000 (22:15 +0100)
For context see discussion https://github.com/sqlalchemy/sqlalchemy/discussions/11124. This change adds the requested cross-reference to the documentation.

This pull request is:

- [X] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #11133
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11133
Pull-request-sha: f8cc7a9c510f058f75bcb4308f3f398b8ae70de8

Change-Id: Ic683354fa05560d869d47ceda820d88e758e2973

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..d2ed13841f24e37012353065c9e23bdfe94342ae 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`.
 
+.. seealso::
+
+   :ref:`orm_declarative_table_adding_relationship` - similar examples for :func:`_orm.relationship`
+
 .. note:: Assignment of mapped
     properties to an already mapped class will only
     function correctly if the "declarative base" class is used, meaning