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
Realm.deleteAll() is trying to delete RealmObjects across module boundaries #5745
Comments
I would think that currently, I'm actually more surprised that
I would have expected this to have a schema mismatch and delete the Realm because migration was needed, after which it SHOULD allow deleting items. So there could be a bug there with schema caching |
Hi @jpetitto Thanks for the nice example project. I'm able to reproduce the behaviour and something indeed looks fishy. I'm looking into it. |
I found the issue(s).
I suspect this error can also show up in other ways, e.g. through the I'll need to dig a little further, but it looks like we need to fix 3 workarounds exist right now:
|
Oh hey, it'd work with DynamicRealm? that's pretty cool, I didn't think of that. |
Thanks for investigating this @cmelchior - I like the solution of using separate files for each module. I'm currently manually deleting each model type, which can be a bit error prone if I forget to update it. Glad I could help surface the issue with |
Would this issue be related to what I am seeing here? - https://stackoverflow.com/questions/49164180/need-help-understanding-how-to-remove-realm-models-from-schema?noredirect=1#comment85351896_49164180 |
I have a project with multiple modules using Realm. I was hoping that I could just call
deleteAll()
on aRealm
for one of the modules, but it seems to be trying to deleteRealmObjects
from the other modules, leading to a runtime exception.Expected Results
Actual Results
Steps & Code to Reproduce
Code Sample
Version of Realm and tooling
Realm version(s): 4.3.3
Realm sync feature enabled: no
Android Studio version: 3.0
Which Android version and device: Android 8 on a OnePlus 3T
The text was updated successfully, but these errors were encountered: