diff options
author | nimiq <nimiq@users.noreply.github.com> | 2014-04-10 16:35:03 +0200 |
---|---|---|
committer | nimiq <nimiq@users.noreply.github.com> | 2014-04-10 16:35:03 +0200 |
commit | f893e8148540199672e59b416b42a421bd3b64ff (patch) | |
tree | c87e3de92416fe940942ed3d046561ad44b36278 | |
parent | 9f74861d6d2962cb255887c78d5d0f4cb8891cfa (diff) | |
download | sqlalchemy-pr/83.tar.gz |
Fix a typo in the ForeignKeypr/83
The table Address has a ForeignKey to the table User. Thus the correct syntax is: `ForeignKey('user.id'))`
-rw-r--r-- | doc/build/orm/tutorial.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst index 9a1050680..6f56821ae 100644 --- a/doc/build/orm/tutorial.rst +++ b/doc/build/orm/tutorial.rst @@ -1156,7 +1156,7 @@ declarative, we define this table along with its mapped class, ``Address``: ... __tablename__ = 'addresses' ... id = Column(Integer, primary_key=True) ... email_address = Column(String, nullable=False) - ... user_id = Column(Integer, ForeignKey('users.id')) + ... user_id = Column(Integer, ForeignKey('user.id')) ... ... user = relationship("User", backref=backref('addresses', order_by=id)) ... |