-
Notifications
You must be signed in to change notification settings - Fork 297
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
Entities in Backlink ToMany reappearing after removing #1065
Comments
Thanks for reporting! The issue are these lines as you already found out:
It should be done in this order:
The We'll see if this can be improved by explicitly requiring an update which would do nothing if the object was already removed from its box. Side-note: you may want to have a look at |
Describe the bug
When trying to remove entities from a One-To-Many relationship, they keep reappearing in the database after put() when first removing from the relationship and afterwards from box
Basic info (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
one
andmany
)many
) of the other (one
).one.many.removeById(id)
box.remove(id)
one
) in the box again (overriding it)Expected behavior
No matter the order, if an entity gets deleted from the box and the relation and is nowhere to be found, it should not reappear in the box.
Code
My Repo
Example code where I tested the issue in a Kotlin project
Additional context
Flipping the order (e.g. first removing the entity from the box) and THEN removing it from the ToMany works.
The text was updated successfully, but these errors were encountered: