[sqlalchemy] Re: delete failure with foreign key relations

2009-01-29 Thread Alex K
Well, this error says that you have rows in other(or same) tables referring to this row you are going to delete, and you should delete referring rows first. If you want SQLA to do it automatically, you need to use sessions and mappers (not raw SQL expression engine), more info here:

[sqlalchemy] Re: delete failure with foreign key relations

2009-01-29 Thread n00b
sorry. i obviously didn't explain too well. it DOES work with ORM. i don't have a problem at all. however, i can't work with the tables using engine.conect or straight MySQLdb, for that matter. in fact, closer examination suggests that not only are the onupdate, ondelete = CASCADE not set in the