""" On 12/02/2011 06:54 PM, Kääriäinen Anssi wrote: > I think I will pursuit the immutable PK approach, and see how it > works (back to square one). BTW are there -1 calls on this approach, > or the pk change tracking in general?
I haven't been fully following this thread, but I will say that I'm not yet convinced that the ORM behavior should be changed such that saving an instance with a modified PK updates the row rather than saving a new instance. """ At this point this is not the idea. The idea is to just disallow this (assuming multicolumn PK firstname, lastname): user = User(firstname = 'Jack', lastname = 'Smith') user.save() user.firstname = 'John' user.save() Current behavior will leave Jack Smith in the DB, and save John Smith as new object. I my opinion it is too easy to clone the object accidentally. The idea would be to raise exception from the second save (deprecation warning at this point). A way to get the current behavior is needed too, but the user should explicitly request that. Later on, maybe there should be some way to actually update the PK. But that is not the current plan. - Anssi -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.