Closed markostanimirovic closed 3 months ago
Name | Link |
---|---|
Latest commit | 9990abd78e0859473c17bae23dfe3e5d8725d53e |
Latest deploy log | https://app.netlify.com/sites/ngrx-io/deploys/668043d1d1f6b00009655a6d |
@timdeschryver With allowing ID changes there are several ways to break/move entity collection to the inconsistent state. That's the reason why I was against this change initially. Users now have better control, but also responsibility.
Let's check how @ngrx/entity
handles this case. It probably works the same.
I agree that warning will be useful π
I just checked @ngrx/entity
- the behavior is the same. Let's add a warning then.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
It's not possible to modify entity ID via
update*
functions. Instead, it's necessary to remove the existing one and add a new entity with an updated ID:Closes #4235
What is the new behavior?
The
update*
updaters can be used to modify entity ID:Does this PR introduce a breaking change?
Other information
After this change, it's necessary to provide
selectId
to allupdate*
updaters if an entity has a custom ID.This is not considered as a breaking change because the
@ngrx/signals
package is in developer preview.