Re: [sqlalchemy] cascade delete in relationship and session.execute(table.update())

2012-01-06 Thread Wu-bin Zhen
I really appreciate your help! It works great without any problem. I tried session.refresh(storeobject) and I was wondering why it didn't work, now I learned the difference from your method. Again, thank you very much, and have a great weekend. On Tue, Jan 3, 2012 at 10:56 AM, Michael Bayer wrot

Re: [sqlalchemy] cascade delete in relationship and session.execute(table.update())

2012-01-03 Thread Michael Bayer
On Jan 2, 2012, at 4:06 PM, Wubin wrote: > > class Product(PolymorphicClass): #there are different types of the > product >__tablename__ = "products" >id = Column("id", Integer, primary_key=True, key="id") > name = Column("name", String(50), unique=True, nullable=False) >

[sqlalchemy] cascade delete in relationship and session.execute(table.update())

2012-01-02 Thread Wubin
Hi, Currently I am trying to implement a feature that transfers all products in a store to another store, and then destroy the old store which contains no product. The sqlalchemy version is 0.6.8. class Product(PolymorphicClass): #there are different types of the product __tablename__ = "