title: Foreign Key constraints on Inherited attributes in sqlalchemy
body: <p>I am defining an inherited class called  <code>Type1Edge</code> which connects to nodes, I want to make sure that the two nodes are in the same system as to not connect to unrelated nodes. Therefore I want to check that both of the nodes appear with the same sys_id in the nodes table. I want to perform the check on the inheriting class <code>Type1Edge</code>. If I define <code>sys_id</code> only in <code>BasicEdgeObject</code> I can't check forigen key constraint<br>
  <code>ArgumentError: Column(s) 'fss_id' are not part of table 'type_1_edge.</code> 
  and if I put <code>sys_id</code> on both I get a warning<br>
  <code>SAWarning: Implicitly combining column basic_edge_object.fss_id with column qualification.fss_id under attribute 'fss_id'.</code>
  Is there a standard way of doing this?.</p>
  
  <pre><code>class BasicEdgeObject(Base):
  
  __tablename__ = 'basic_edge_object'
  id = Column(Integer, primary_key=True)
  sys_id = Column(Integer, ForeignKey('sys.id'))
  
  __mapper_args__ = {
      'polymorphic_identity': 'basic_edge_object',
      'polymorphic_on': obj_type
  }
  
  __mapper_args__ = {
      'polymorphic_identity': 'basic_node_object',
      'polymorphic_on': obj_type
  }
  class Type1Edge(BasicEdgeObject):
  
  __tablename__ = 'type_1_edge'
  id = Column(Integer, ForeignKey('basic_edge_object.id'), primary_key=True)
  node_1_id = Column(Integer)
  node1= relationship('Node', back_populates='edges', foreign_keys=[node1_id])
  node2_id= Column(Integer)
  node2= relationship('Node', back_populates='edges',foreign_keys[node2_id])
  name = Column(String)
  
  __table_args__ = (ForeignKeyConstraint([node1_id,sys_id],                                         
                    [BasicNodeObject.id,BasicNodeObject.sys_id]),
                    ForeignKeyConstraint([node2_id, sys_id], 
                    [BasicNodeObject.id, BasicNodeObject.sys_id]))
  
  __mapper_args__ = {
      'polymorphic_identity': 'qualification',
  }`
  </code></pre>