You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, bulk update validation always reported errors at index 0
regardless of which item failed. This was because validation happened
per-item inside the loop, with each item wrapped as [$plainPayload].
Changes:
Move allowToUpdateBulk() call before transaction (like bulk store)
Remove array wrapping in ValidatingTrait::validatorForUpdateBulk()
Add test for correct validation indices
Now when items at index 1 and 2 fail, errors correctly show as
1.field and 2.field instead of 0.field.
Improvements to Bulk Update Controller
This change introduces a more efficient way to perform updates on multiple items in the database at once. Specifically, the logic behind bulk updates has been simplified by removing unnecessary checks, resulting in faster processing times.
Adjustments to Validation Logic
The changes to the validation rules are designed to better handle situations where the data to be validated is not provided (null). The correct sequence now correctly identifies whether the data is present or not, improving overall system reliability.
Enhancement of Validation Tests
The update includes additional tests to ensure the application behaves as expected when performing bulk updates. These tests confirm that the system correctly identifies indices, or positions of data items, within a bulk update, whether the update is valid or not. This helps to maintain the system's stability and accuracy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, bulk update validation always reported errors at index 0
regardless of which item failed. This was because validation happened
per-item inside the loop, with each item wrapped as [$plainPayload].
Changes:
Now when items at index 1 and 2 fail, errors correctly show as
1.field and 2.field instead of 0.field.