From: Andres Torres <34612646+Ahsoka@users.noreply.github.com> Date: Tue, 9 Mar 2021 06:20:04 +0000 (-0800) Subject: Added import of synonym in example code in Synonym portion of docs X-Git-Tag: rel_1_4_0~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6017%2Fhead;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Added import of synonym in example code in Synonym portion of docs --- diff --git a/doc/build/orm/mapped_attributes.rst b/doc/build/orm/mapped_attributes.rst index a8711d2e64..91e43d2021 100644 --- a/doc/build/orm/mapped_attributes.rst +++ b/doc/build/orm/mapped_attributes.rst @@ -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'