On Thu, 31 Jul 2014, Jonathan Vanasco wrote:

backref indicates the string name of a property to be placed on the
related mapper’s class that will handle this relationship in the other
direction. The other property will be created automatically when the
mappers are configured. Can also be passed as a backref() object to
control the configuration of the new relationship.

Using your examples side-by-side:

    user = relationship("User", backref=backref('addresses', order_by=id))
    addresses = relationship("Address", backref="user")

Jonathan,

  So I can specify the relationship from either class/table. I'll read the
docs again to make sure I fully understand which form to use when.

Thank you,

Rich

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to