Sorry, one follow-up. I can actually get this to work by setting cascade='all, delete-orphan'. But since the FK will do a cascading delete, it is slower for SQLAlchemy to have to issue the statements. Can I just make SQLAlchemy not issue anything when deleting the parent?
On Sep 30, 2:14 am, Randy Syring <[EMAIL PROTECTED]> wrote: > More details are > here:http://groups.google.com/group/sqlelixir/browse_thread/thread/aac5d22... > > But basically, I have a relationship between a parent (Item) table and > child (Link) table. When I try to delete an Item, an SQL statement is > generated by SQLAlchemy that tries to set Link.item_id = NULL. That > is invalid, because Link.item_id is a NOT NULL column and also because > I have a FK on the column. I have tried adjusting the cascade options > to no avail. > > I would *really* appreciate some help on this, it is caused me to come > to a grinding hault on a project I am working on that needs to be done > by the end of the week. > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---