I have a structure like this A.py class A: _some_fields B.py class B: _field1id = Column(...) _field1 = relationship( A.A, primaryjoin=lambda:A.A.id==B.field1id, backref="b", uselist=False ) _field2id = Column(...) _field2 = relationship( A.A, primaryjoin=lambda:A.A.id==B.field2id, backref="b", uselist=False )
I know this will not work because the relationship field1 has already created "b" on A. I have tried using back_populates="b" in place of backref in class B and adding _b = relationship( "B", primaryjoin="or_(A.id==B.field1id, A.id==B.field2id)" ) to A Any ideas on how I would go about this? Thanks, Aman -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
