Skip to content
  • Sean Griffin's avatar
    dc03f944
    Ensure that records with unselected fields can be updated · dc03f944
    Sean Griffin authored
    As part of refactoring mutation detection to be more performant, we
    introduced the concept of `original_value` to `Attribute`. This was not
    overridden in `Attribute::Uninitialized` however, so assigning ot an
    uninitialized value and calling `.changed?` would raise
    `NotImplementedError`.
    
    We are using a sentinel value rather than checking the result of
    `original_attribute.initialized?` in `changed?` because `original_value`
    might go through more than one node in the tree.
    
    Fixes #25228
    dc03f944
    Ensure that records with unselected fields can be updated
    Sean Griffin authored
    As part of refactoring mutation detection to be more performant, we
    introduced the concept of `original_value` to `Attribute`. This was not
    overridden in `Attribute::Uninitialized` however, so assigning ot an
    uninitialized value and calling `.changed?` would raise
    `NotImplementedError`.
    
    We are using a sentinel value rather than checking the result of
    `original_attribute.initialized?` in `changed?` because `original_value`
    might go through more than one node in the tree.
    
    Fixes #25228
Loading