]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Added import of synonym in example code in Synonym portion of docs 6017/head
authorAndres Torres <34612646+Ahsoka@users.noreply.github.com>
Tue, 9 Mar 2021 06:20:04 +0000 (22:20 -0800)
committerGitHub <noreply@github.com>
Tue, 9 Mar 2021 06:20:04 +0000 (22:20 -0800)
doc/build/orm/mapped_attributes.rst

index a8711d2e6439b8129f055dd0675ca765fb42763d..91e43d2021cbd7c6a9dc17c7cea555cbe7d66bfb 100644 (file)
@@ -256,6 +256,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'