Changes between Initial Version and Version 1 of Ticket #35425


Ignore:
Timestamp:
May 3, 2024, 3:44:37 AM (5 months ago)
Author:
Jacob Walls
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35425 – Description

    initial v1  
    9090So, at least when I'm in an overwriting posture--and Ken brings up a good point that [https://forum.djangoproject.com/t/save-behavior-when-updating-model-with-default-primary-keys/30778/9 forcing the user to opt in to this potential for data loss] for existing primary keys is worth something--I prefer `save()`. It's simpler and doesn't involve "defaults". (''What's a "default" got to do with updating one row's values?'') It's also faster for the UPDATE case, which is my hot path. I might be in the minority, and could be convinced otherwise. (A third variation is possible, `.filter(pk=known).update(...)`, but not unless you know the objects necessarily exist.) But everything I just said is skating on pretty rarefied ice -- the basic point is that ''huh, I have to be careful with save() depending on the details of my field definitions?''
    9191
    92 This was acknowledged as an acceptable wart in #29260 and then documented further in #31070 with a fleshed out comment in the 3.0 release notes.
     92This was acknowledged as an acceptable wart in #29260 and then documented further in #31071 with a fleshed out comment in the 3.0 release notes.
    9393
    9494At all of those points, though, it was assumed that this would still succeed:
Back to Top