[sqlalchemy] determine if relationship is a backref

2012-08-15 Thread Jason
Is there a way to determine if a relationship property on a model class is a backref? For instance I have the model: class Department(Base): department_id = Column(Int(), primary_key=True) class Employee(Base): employee_id = Column(Int(), primary_key=True) department_id =

Re: [sqlalchemy] determine if relationship is a backref

2012-08-15 Thread Michael Bayer
On Aug 15, 2012, at 11:35 AM, Jason wrote: Is there a way to determine if a relationship property on a model class is a backref? not in the strict sense, because a backref is just configurational sugar for two separate relationship() objects that are aware of each other.But you can

Re: [sqlalchemy] determine if relationship is a backref

2012-08-15 Thread Jason
On Wednesday, August 15, 2012 11:41:20 AM UTC-4, Michael Bayer wrote: in this case it seems like you aren't as much concerned about the actual mapper configuration as you are about codepaths being invoked. So we instrument functions to track when they are called. You'd make a