Changes between Version 2 and Version 3 of Ticket #35499, comment 1


Ignore:
Timestamp:
Jun 6, 2024, 7:00:59 AM (6 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35499, comment 1

    v2 v3  
    33Duplicate of #22981 and #30319 which were both wont-fix'ed.
    44
    5 Think of it the other way around, if `auto_now` fields are automatically added to `update_fields` how is possible to perform a `save` without them being updated? `Model.save(update_fields)` is a low level option that control exactly which fields should be added to the `UPDATE` statement used to perform the persist the change and is aligned with how `QuerySet.update` works. The framework has chosen to have a consistent behavior towards explicit update specification over preventing complete control by treating some fields different than others.
     5Think of it the other way around, if `auto_now` fields are automatically added to `update_fields` how is it possible to perform a `save` without them being updated?
     6
     7`Model.save(update_fields)` is a low level option that control exactly which fields should be added to the `UPDATE` statement crafted to perform the persist the change and is aligned with how `QuerySet.update` works. The framework has chosen to have a consistent behavior towards explicit update specification over preventing complete control by treating some fields different than others.
Back to Top