[sqlalchemy] joined-table inheritance and ambiguous foreign keys

2013-07-24 Thread Seth P
The code below produces the error message below. How do I tell SQLAlchemy that the inheritance join condition should be b.id == a.id rather than b.parent_a_id == a.id? (I would think the primary_key=True could be a hint...) I can't figure it out from the documentation. class A(Base):

Re: [sqlalchemy] joined-table inheritance and ambiguous foreign keys

2013-07-24 Thread Michael Bayer
its a mapper arg called inherit_condition: __mapper_args__ = {inherit_condition: id==A.id} On Jul 24, 2013, at 3:42 PM, Seth P spadow...@gmail.com wrote: The code below produces the error message below. How do I tell SQLAlchemy that the inheritance join condition should be b.id == a.id

Re: [sqlalchemy] joined-table inheritance and ambiguous foreign keys

2013-07-24 Thread Seth P
Thank you. On Wed, Jul 24, 2013 at 5:51 PM, Michael Bayer mike...@zzzcomputing.comwrote: its a mapper arg called inherit_condition: __mapper_args__ = {inherit_condition: id==A.id} On Jul 24, 2013, at 3:42 PM, Seth P spadow...@gmail.com wrote: The code below produces the error message