Skip to content
  • Brad Price's avatar
    0a5b41c4
    Check that entire collection has been loaded before short circuiting · 0a5b41c4
    Brad Price authored
    Currently, when checking that the collection has been loaded, only the first
    record is checked. In specific scenarios, if a record is fetched via an `after_initialize`
    hook, there is a chance that the first record has been loaded, but other records in the
    collection have not.
    
    In order to successfully short circuit the fetching of data, we need to verify that
    all of the records in the collection have been loaded.
    
    * Create test for edge case
    * Move `reset_callbacks` method to `cases/helper`, since it has been defined in multiple
      locations.
    
    Closes #37730
    0a5b41c4
    Check that entire collection has been loaded before short circuiting
    Brad Price authored
    Currently, when checking that the collection has been loaded, only the first
    record is checked. In specific scenarios, if a record is fetched via an `after_initialize`
    hook, there is a chance that the first record has been loaded, but other records in the
    collection have not.
    
    In order to successfully short circuit the fetching of data, we need to verify that
    all of the records in the collection have been loaded.
    
    * Create test for edge case
    * Move `reset_callbacks` method to `cases/helper`, since it has been defined in multiple
      locations.
    
    Closes #37730
Loading