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
Which @ngneat/elf-* package(s) are the source of the bug?
entities
Is this a regression?
No
Description
When upserting an array of entities, where some entities do not yet exist but were repeated in the array, the upsertion will result in the same id being added to the ids array for multiple times.
for(constentityofentitiesArray){constid: getIdType<S,Ref>=entity[idKey];if(hasEntity(id,options)(state)){// <-- This should be `hasEntity(id, options)(state) || updatedEntitiesId.includes(id)`asObject[id]={ ...state[entitiesKey][id], ...entity};updatedEntitiesId.push(id);}else{ids.push(id);asObject[id]=entity;}}
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
Yes
The text was updated successfully, but these errors were encountered:
I also see that the upsert is not always working. Right now I have an object that changed after a request, and after the upsert, the data inside of it is not changing.
Which @ngneat/elf-* package(s) are the source of the bug?
entities
Is this a regression?
No
Description
When upserting an array of entities, where some entities do not yet exist but were repeated in the array, the upsertion will result in the same id being added to the
ids
array for multiple times.https://github.com/ngneat/elf/blob/9dbc51d5e36233fab81128072354548facb26256/packages/entities/src/lib/update.mutation.ts#L229C1-L239C6
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
Yes
The text was updated successfully, but these errors were encountered: