From 53c3119ebb6801cbfcaf2841311d117eba250444 Mon Sep 17 00:00:00 2001 From: Edouard Berthe Date: Wed, 31 Aug 2016 16:52:48 +1000 Subject: [PATCH] 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. --- doc/build/orm/basic_relationships.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' -- 2.47.3