-
Hey 👋! My elf version:
for some reason that map spread raises an argument error, but it works as expected. So the question is: what is the closest thing to akita's upsertMany in elf? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 19 replies
-
Can you please describe the use case for |
Beta Was this translation helpful? Give feedback.
-
@mmpneo any reason you can't use the following code? load(data: ContentEntity[]) {
store.update(
upsertEntities(data.map(e => e.id), {updater: _ => v, creator: _ => v})),
updateRequestStatus('load', 'success'));
} |
Beta Was this translation helpful? Give feedback.
-
I'm facing the same problem as above. I find the upsertEntities function to be harder to grasp as a concept than just constructing an array of items I want to update and passing them to the store. @NetanelBasal what api are you thinking of adding? |
Beta Was this translation helpful? Give feedback.
-
This was implemented in v2 https://ngneat.github.io/elf/docs/features/entities/entities#upsertentities |
Beta Was this translation helpful? Give feedback.
This was implemented in v2
https://ngneat.github.io/elf/docs/features/entities/entities#upsertentities