Django sets this for you if your database supports it (ie: you are using postgres or mysql with innodb tables). If you are using mysql, check that tables aren't MyISAM. If you want to do this inside Django, more complex because if you change an object's primary key, Django concludes that you want to work with another row altogether and doesn't modify your original row.
Can I ask why you would need to change PKs? On Fri, Jul 18, 2008 at 7:58 AM, Torsten Bronger < [EMAIL PROTECTED]> wrote: > > Hallöchen! > > When I change the value of a primary key field (assuming that it is > still unique), are depending tables also updated? I found on the > net that "ON UPDATE CASCADE" has to be set for the child tables, but > I didn't find anything Django-related. > > Tschö, > Torsten. > > -- > Torsten Bronger, aquisgrana, europa vetus > Jabber ID: [EMAIL PROTECTED] > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

