summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdouard Berthe <berthe.ed@gmail.com>2016-08-31 16:52:48 +1000
committerGitHub <noreply@github.com>2016-08-31 16:52:48 +1000
commit53c3119ebb6801cbfcaf2841311d117eba250444 (patch)
treecc396500116dbac5a88faed71a81f5d5db852fac
parent7c59d681a0a1ad8a1c8b8c537150da4e7f37d2a3 (diff)
downloadsqlalchemy-pr/305.tar.gz
Corrects typopr/305
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.
-rw-r--r--doc/build/orm/basic_relationships.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/build/orm/basic_relationships.rst b/doc/build/orm/basic_relationships.rst
index 069f8e73f..cd6389ab7 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'