Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update with duplicate ids #128

Closed
productivityindustries opened this issue Feb 2, 2022 · 2 comments
Closed

update with duplicate ids #128

productivityindustries opened this issue Feb 2, 2022 · 2 comments
Assignees

Comments

@productivityindustries
Copy link

Which @ngneat/elf-* package(s) are the source of the bug?

store

Is this a regression?

No

Description

When performing a store.update with multiple entities (using setEntities, addEntities, ...), if two objects have the same ID the resulting store will have them both. Expected?

Obviously it's a bug from the caller, but still I would not expect a tainted store: even throwing an error is a better solution in this case IMO.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-ivy-xvpq7m?file=src/app/todos/state/todos.repository.ts

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?

No

@yackinn
Copy link
Contributor

yackinn commented Feb 4, 2022

Thank you. I'll take care of it some time next week.

@productivityindustries
Copy link
Author

Thank you!
Please note the same issue is present in akita, i filed a similar report there: salesforce/akita#796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants