Re: [sqlalchemy] Concrete inheritance and child relationship query

2012-06-29 Thread tonthon
Le 29/06/2012 16:14, Michael Bayer a écrit : > On Jun 29, 2012, at 6:31 AM, tonthon wrote: > >> I had also to add : >> c1 = aliased(Client) >> c2 = aliased(Client) > oh right, forgot that part > >> query(Task).with_polymorphic([Invoice, Estimation]).outerjoin(p1, >> Invoice.project).outerjoin(p2, E

Re: [sqlalchemy] Concrete inheritance and child relationship query

2012-06-29 Thread Michael Bayer
On Jun 29, 2012, at 6:31 AM, tonthon wrote: > I had also to add : > c1 = aliased(Client) > c2 = aliased(Client) oh right, forgot that part > query(Task).with_polymorphic([Invoice, Estimation]).outerjoin(p1, > Invoice.project).outerjoin(p2, Estimation.project).outerjoin(c1, > p1.client).outerjoi

Re: [sqlalchemy] Concrete inheritance and child relationship query

2012-06-29 Thread tonthon
Le 28/06/2012 16:40, Michael Bayer a écrit : > On Jun 28, 2012, at 6:38 AM, tonthon wrote: > >> Hi, >> >> I've got a problem understanding how to handle relationships with >> polymorphism >> Sorry for the db design (I took it overs as it is ). >> >> I've got a parent class Task >> >> class Task(DBB

Re: [sqlalchemy] Concrete inheritance and child relationship query

2012-06-28 Thread tonthon
Le 28/06/2012 16:40, Michael Bayer a écrit : > On Jun 28, 2012, at 6:38 AM, tonthon wrote: > >> Hi, >> >> I've got a problem understanding how to handle relationships with >> polymorphism >> Sorry for the db design (I took it overs as it is ). >> >> I've got a parent class Task >> >> class Task(DBB

Re: [sqlalchemy] Concrete inheritance and child relationship query

2012-06-28 Thread Michael Bayer
On Jun 28, 2012, at 6:38 AM, tonthon wrote: > Hi, > > I've got a problem understanding how to handle relationships with > polymorphism > Sorry for the db design (I took it overs as it is ). > > I've got a parent class Task > > class Task(DBBASE): >__tablename__ = 'task' >id = Column(In

[sqlalchemy] Concrete inheritance and child relationship query

2012-06-28 Thread tonthon
Hi, I've got a problem understanding how to handle relationships with polymorphism Sorry for the db design (I took it overs as it is ). I've got a parent class Task class Task(DBBASE): __tablename__ = 'task' id = Column(Integer, primary_key=True) amount = Column(Integer) and two chi