Re: [sqlalchemy] Dropping all tables + more

2012-12-21 Thread Russell Warren
On Fri, Dec 14, 2012 at 11:18 PM, Michael Bayer wrote: > Nothing has changed regarding that recipe and I just ran it on a small set > of tables against Postgresql (which I can see is the DB you're using) and > it runs fine. Are you sure the identical schema *does* drop completely > when this reci

Re: [sqlalchemy] Keeping soft deletion atomic in spite of model methods calling commit

2012-12-21 Thread Charles-Axel Dein
Thanks Michael. Always spot on. And I don't think I can find a more authoritative source ;) On Wed, Dec 19, 2012 at 5:48 PM, Michael Bayer wrote: > > On Dec 19, 2012, at 4:29 AM, charlax wrote: > > > So the problem here is that the rollback does nothing, because there's a > commit in the delete_

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