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

Allow to delete RealmResults baked by backlinks #1413

Closed
promanowicz opened this issue Jun 7, 2023 · 2 comments
Closed

Allow to delete RealmResults baked by backlinks #1413

promanowicz opened this issue Jun 7, 2023 · 2 comments

Comments

@promanowicz
Copy link

promanowicz commented Jun 7, 2023

Problem

If I try to remove all objects that are in the RealmResult list baked by backlinks
I get
java.lang.IllegalArgumentException: Cannot delete custom Deleteable objects: ObjectBoundRealmResults
at io.realm.kotlin.internal.InternalDeleteableKt.asInternalDeleteable(InternalDeleteable.kt:36)
at io.realm.kotlin.internal.InternalMutableRealm$DefaultImpls.delete(InternalMutableRealm.kt:63)
at io.realm.kotlin.internal.SuspendableWriter$WriterRealm.delete(SuspendableWriter.kt:51)
...
when doing MutableRealm.delete(realmResults)

Solution

All elements of backlinked RealmResults are deleted from database when doing MutableRealm.delete(realmResults)

Alternatives

No response

How important is this improvement for you?

I would like to have it but have a workaround

Feature would mainly be used with

Local Database only

@cmelchior
Copy link
Contributor

Thank you for reporting this. Yes, this is a bug that will be fixed.

@cmelchior
Copy link
Contributor

This should be fixed in 1.9.1 which was just released to Maven Central.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants