title: SQLAlchemy Join two tables in (1 to 0..1 ) relationship
body: <p>I have these two tables in (1 to 0..1) relationship:</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code># --------------------------------------------------
  class Person(db.Model):
      __tablename__ = 'person'
      id = db.Column(db.Integer, primary_key=True)
  
      name = db.Column(db.String, nullable=False)
      address = db.Column(db.String, nullable=False)  
  
  # --------------------------------------------------
  class Gift(db.Model):
      __tablename__ = 'gift'
      id = db.Column(db.Integer, primary_key=True)
  
      person_id = db.Column(db.Integer, db.ForeignKey('person.id'))
      person = relationship("Person", uselist=False, backref="gift")
  
      gift_idea = db.Column(db.String, nullable=False)
  
  # --------------------------------------------------
  </code></pre>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li><p>Is the structure of my one to one  tables correct? I know that in the SQLAlchemy documentation, the relationship code line (person = relationship...) is in the parent class but I need it to be in the child class, is that OK?!</p></li>
  <li><p>My goal is to display (gift_idea from Gift table) and (person_name, person_address from Person table), if there's a gift_idea for that person. In my search I found people use query.join to get that and I have tried many codes but this following statement at least get me half the content I
  need:</p></li>
  </ol>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>    a = session.query(Gift).join(Person)
  </code></pre>
  
  <p>Could you please assist me with my questions? Thank you for any effort.</p>