Reputation: 326
I have one stupid question. How can I change parent of the child in realm java-android with saving child's id. Should I get Bookmark from one parent. delete it. And create new one with the same id in other parent?
Thank you!
UPDATED
Or, if I understand correctly, I can delete from one parent's resultList child and add it to other's without creating a new one.
Upvotes: 0
Views: 133
Reputation: 326
According to realm's documentation we can freely manipulate RealmList relations contents.
I've done in the following way:
new_category.getBookmarks().add(bookmark);
parent_category.getBookmarks().remove(bookmark);
Upvotes: 2