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_3_24~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffab2ea3a49ec7528acab1e297536fe5b9a0dc05;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Added import of synonym in example code in Synonym portion of docs (cherry picked from commit 4f857567923ccdbd18dae7a4aa98db040d396e57) --- diff --git a/doc/build/orm/mapped_attributes.rst b/doc/build/orm/mapped_attributes.rst index b8a0f89c94..72a91421d7 100644 --- a/doc/build/orm/mapped_attributes.rst +++ b/doc/build/orm/mapped_attributes.rst @@ -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'