From ffab2ea3a49ec7528acab1e297536fe5b9a0dc05 Mon Sep 17 00:00:00 2001 From: Andres Torres <34612646+Ahsoka@users.noreply.github.com> Date: Mon, 8 Mar 2021 22:20:04 -0800 Subject: [PATCH] Added import of synonym in example code in Synonym portion of docs (cherry picked from commit 4f857567923ccdbd18dae7a4aa98db040d396e57) --- doc/build/orm/mapped_attributes.rst | 2 ++ 1 file changed, 2 insertions(+) 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' -- 2.47.3