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
We'll change GetAll to be a method without any arguments and add a new GetMultiple method that takes an array of keys as an argument. This will be changed on all relevant services.
Version
Umbraco 15
Previous behavior
Today, GetAll receive an array of keys that should be returned, however, if your array is empty, it returns all.
New behavior
GetAll will not have any arguments while GetMultiple will receive an array of keys that should be returned.
Type of breaking change
Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.
Reason for change
It's not obvious, that you get all items if you pass an empty array to GetAll. Much usage of this method passes an array - that might be empty and therefore unintentionally return all elements - which has a significant performance cost. We therfore want to ensure that we only return all elements when this is intended. At the same time, we want to simplify the usage of our services.
Recommended action
Usage of GetAll should be evaluated and either changed to GetMultiple or - if used with an empty array as an argument - changed to GetAll without any parameters.
Affected APIs
All services
The text was updated successfully, but these errors were encountered:
Description
We'll change GetAll to be a method without any arguments and add a new GetMultiple method that takes an array of keys as an argument. This will be changed on all relevant services.
Version
Umbraco 15
Previous behavior
Today, GetAll receive an array of keys that should be returned, however, if your array is empty, it returns all.
New behavior
GetAll will not have any arguments while GetMultiple will receive an array of keys that should be returned.
Type of breaking change
Reason for change
It's not obvious, that you get all items if you pass an empty array to GetAll. Much usage of this method passes an array - that might be empty and therefore unintentionally return all elements - which has a significant performance cost. We therfore want to ensure that we only return all elements when this is intended. At the same time, we want to simplify the usage of our services.
Recommended action
Usage of GetAll should be evaluated and either changed to GetMultiple or - if used with an empty array as an argument - changed to GetAll without any parameters.
Affected APIs
All services
The text was updated successfully, but these errors were encountered: