Closed magillus closed 7 years ago
I will dig into co-routines, maybe there is some hope for this. I will keep this ticket posted
I come up with this solution, still not final and not working fully (saveAll from Array/Collection): https://github.com/magillus/Kotlin-Realm-Extensions/pull/1/files However it does some job done, I will try to update it for full support.
Hi @magillus, additional configurations is something I had in mind but it wasn't one of my priorities. I think you have done a great job, and I'll be pleased to merge your commit into master when you have finished. I will look into your changes deeper this week and keep this issue opened to track your request.
Thank you very much.
Cool, thanks! I will try to wrap this PR up and add more comments where needed in upcoming week.
The PR need to wait to removing the RxJava1/2 from dependencies, got some errors on that front. I did some updates and latest master merge, and I plan to add Unit test (if time permits next week)
Also not sure about TestRealmConfigurationFactory
etc. got errors on it with my PR, when I get a chance I will try to read code for it to understand.
We need this enhancement as well. Is this coming any time soon?
Hi @JimClermonts, I don't know if @magillus have plans to send me a PR. If not, I can do it in the next week. I will wait for a few days and if I dont have any update, I will try to make time to do it.
@vicpinm keep me updated. Maybe we can also do it. We love this extension.
I am so sorry for delay, I was away on vacation. I try to update the PR: https://github.com/magillus/Kotlin-Realm-Extensions/pull/1/files based on latest, (edit: asap)
Version 1.2.0-beta1 is now available with configurations per model. All models will have the default configuration, but you can specify other configurations with:
RealmConfigStore.init(modelClass, modelConfig)
RealmConfigStore.init(modelClass2, modelConfig2)
Version 1.2.0 is in beta but I think that it will be soon uploaded as stable.
Thanks to @magillus for his PR.
I think right now the extensions are limited to single RealmConfiguration (default).
Maybe we can introduce a extension method that would wrap into additional configurations, like:
User("testuser").realm(realmConfig).save()
orUser("testuser").save(realmConfig)
Or even remember configuration per Module/RealmObject or set it via initialization.