]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix imports in "Self-Referential Many-to-Many Relationship" code example (#11120)
authorDenis Laxalde <denis.laxalde@dalibo.com>
Mon, 11 Mar 2024 20:59:51 +0000 (21:59 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 11 Mar 2024 21:00:21 +0000 (22:00 +0100)
Some were unused, some were missing.

(cherry picked from commit 461ababb789dd024f4e9d0c5f06e405eb911026e)

doc/build/orm/join_conditions.rst

index 5846b5d206f3ec7a2f88424ce4bfb3a9e2352cc7..1a26d94a8b7f3e6aa43b75640a509da31bbd3e36 100644 (file)
@@ -543,9 +543,9 @@ is when establishing a many-to-many relationship from a class to itself, as show
 
     from typing import List
 
-    from sqlalchemy import Integer, ForeignKey, String, Column, Table
-    from sqlalchemy.orm import DeclarativeBase
-    from sqlalchemy.orm import relationship
+    from sqlalchemy import Integer, ForeignKey, Column, Table
+    from sqlalchemy.orm import DeclarativeBase, Mapped
+    from sqlalchemy.orm import mapped_column, relationship
 
 
     class Base(DeclarativeBase):