title: How to make 'tags' affect a relation(column_property)
body: <p>I'm working on a project with Flask-SQLAlchemy.</p>
  
  <p>The model looks like this:
  cars have components,
  components can have issues</p>
  
  <p>car has a column_property 'needs_repair' which is true when a car's component has issues</p>
  
  <pre><code> needs_repair = column_property(exists().where(and_(
          carcomponent.columns['car_id'] == id,
          carcomponent.columns['component_id'] == componentissue.columns['component_id']
      )))
  </code></pre>
  
  <p>I added a table for tags with a 'skip'-column, tags are assigned via a table issue_car_tag(ignoring components, only referencing specific car-issue-relations).</p>
  
  <p>Now, i want needs_repair to be true if all assigned tags have skip = False or no tags are assigned</p>
  
  <p>How do I extend the column_property to achieve this?</p>
  
  <p>edit:
  Model/table definitions:</p>
  
  <pre><code>class Component(Base):
      id = db.Column(db.Integer, primary_key=True)
      [...]
      issues = db.relationship('ISsue', secondary=componentissue, lazy='dynamic',
          back_populates='components')
  
      cars = db.relationship('Car', lazy = 'dynamic', secondary=carcomponent,
          back_populates="component"
  
      broken = column_property(exists().where(componentissue.columns['component_id'] == id))
  
  class Car(Base):
     id = db.Column(db.Integer, primary_key=True)
     [...] 
     components = db.relationship('Component', secondary=carcomponent,
          back_populates="cars", lazy='dynamic')
     needs_repair = column_property(exists().where(and_(
              carcomponent.columns['car_id'] == id,
              carcomponent.columns['component_id'] == componentissue.columns['component_id']
          )))
  
  class Issue(Base):
      __tablename__ = "issues"
      [...]    
      components = db.relationship('Component' lazy = 'dynamic', secondary=componentissue,
          back_populates='issues')
  
  class Tag(Base):
      id = db.Column(db.Integer, primary_key=True)
      name = db.Column(db.Text, unique=True)
      description = db.Column(db.Text, nullable=False, default="")
      skip = db.Column(db.Boolean, default = False)
  
  class Issue_Car_Tag(Base):
      id = db.Column(db.Integer, primary_key=True)
      tag_id = db.Column(db.Integer, db.ForeignKey('tag.id'))
      car_id = db.Column(db.Integer, db.ForeignKey('car.id'))
      issue_id = db.Column(db.Integer, db.ForeignKey('issue.id'))
      tag = db.relationship('Tag', backref=db.backref('issue_car_tags'))
      car = db.relationship('Car',  backref=db.backref('issue_car_tags'))
      issue = db.relationship('Issue',  backref=db.backref('issue_car_tags'))
  </code></pre>