Following the ORM tutorial of `User` and `Address`,
if I configure a `user` attribute on `Address`:

class Address(Base):
    __tablename__ = 'addresses'
    id = Column(Integer, primary_key=True)
    email_address = Column(String, nullable=False)
    user_id = Column(Integer, ForeignKey('users.id'))
    
    user = relationship('User', backref='addresses')

`User.addresses` is not available until I initiate a `User` or `Address` 
object.

According to the documentation of backref 
<http://docs.sqlalchemy.org/en/rel_1_0/orm/relationship_api.html#sqlalchemy.orm.relationship.params.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.*


What does it mean?

I'm using version 1.0.12 on Python 3.5.1

Thanks

-- 
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 https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to