I have a simple foreign key relationship between a Task class and a
Context class, where many Tasks can have the same Context.  The
default value for the Task foreign key context_id is 0.  When I delete
a Context, the Tasks with that context have their context_id
automatically set to None and I would like it to be set to 0.  (I
believe this is the default cascade behavior as I do not have any
cascade set on the mapper.)  Right now I then explicitly change each
affected Tasks context_id to 0.  Do I have to do this explicitly, or
is there a way on delete of a Context to have the task updated to a
context_id = 0.  Thanks for any advice.

Steve

--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to