From: Edouard Berthe Date: Wed, 31 Aug 2016 06:52:48 +0000 (+1000) Subject: Corrects typo X-Git-Tag: rel_1_0_15~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32a0660853e9e6afc291a60c516de2d40b1a3a3c;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Corrects typo This example doesn't work with 'back_populates' because 'parent_associations' and 'child_associations' are not defined in Parent and Child classes respectively. Alternatively, we could create 'parent_associations' and 'child_associations' into the classes. (cherry picked from commit 53c3119ebb6801cbfcaf2841311d117eba250444) --- diff --git a/doc/build/orm/basic_relationships.rst b/doc/build/orm/basic_relationships.rst index 069f8e73ff..cd6389ab7e 100644 --- a/doc/build/orm/basic_relationships.rst +++ b/doc/build/orm/basic_relationships.rst @@ -388,8 +388,8 @@ associated object, and a second to a target attribute. right_id = Column(Integer, ForeignKey('right.id'), primary_key=True) extra_data = Column(String(50)) - child = relationship("Child", back_populates="parent_associations") - parent = relationship("Parent", back_populates="child_associations") + child = relationship("Child", backref="parent_associations") + parent = relationship("Parent", backref="child_associations") class Parent(Base): __tablename__ = 'left'