Re: [sqlalchemy] joined inheritance and cascading delete to relationship

2012-12-21 Thread Michael Bayer
On Dec 21, 2012, at 7:14 AM, tonthon wrote: > Hi, > > I've got a joined inheritance : > > class Task(Base): > __tablename__ = 'task' > id = Column(Integer, primary_key=True) > > class Invoice(Task): > __tablename__ = 'invoice' > id = Column(ForeignKey("task.id")) > > When I delete an i

[sqlalchemy] joined inheritance and cascading delete to relationship

2012-12-21 Thread tonthon
Hi, I've got a joined inheritance : class Task(Base): __tablename__ = 'task' id = Column(Integer, primary_key=True) class Invoice(Task): __tablename__ = 'invoice' id = Column(ForeignKey("task.id")) When I delete an invoice, the associated task is also deleted, that's ok. I've got a