]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Added import of synonym in example code in Synonym portion of docs
authorAndres Torres <34612646+Ahsoka@users.noreply.github.com>
Tue, 9 Mar 2021 06:20:04 +0000 (22:20 -0800)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 Mar 2021 18:44:13 +0000 (13:44 -0500)
(cherry picked from commit 4f857567923ccdbd18dae7a4aa98db040d396e57)

doc/build/orm/mapped_attributes.rst

index b8a0f89c948d9f67df5c3c07f3aa84c6bb596eac..72a91421d73e31bbcf5ca37ffc60fd8177dee547 100644 (file)
@@ -254,6 +254,8 @@ to "mirror" another attribute that is mapped.
 In the most basic sense, the synonym is an easy way to make a certain
 attribute available by an additional name::
 
+    from sqlalchemy.orm import synonym
+    
     class MyClass(Base):
         __tablename__ = 'my_table'