title: SQLAlchemy - get a model with all its related models that match a condition
body: <p>Say I have two model like below</p>
  <pre><code>class User(BaseModel):
      firstname = Column(String, nullable=True)
      lastname = Column(String, nullable=True)
      username = Column(String, unique=True, nullable=False)
      password = Column(String, nullable=False)
      belongings = relationship(&quot;Belonging&quot;, back_populates=&quot;user&quot;, lazy='dynamic')
  
  class Belonging(BaseModel):
      start_date = Column(DateTime, nullable=False)
      end_date = Column(DateTime, nullable=True)
      user_id = Column(Integer, ForeignKey(&quot;users.id&quot;, ondelete=&quot;CASCADE&quot;), nullable=False)
      user = relationship(&quot;User&quot;, back_populates=&quot;belongings&quot;, uselist=False)
      is_deleted = Column(Boolean(), default=False)
  </code></pre>
  <p>What I want to do is get the user with all the belongings which have is_deleted==False.
  So each time I get a user, they only have the undeleted belongings in the list of belongings. I'd really appreciate any help for this.</p>