-
Notifications
You must be signed in to change notification settings - Fork 59
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
RealmList is not saved as part of model #334
Labels
Comments
Thanks @tarasmorskyi-mediamonks Exactlly what do you mean by being copied into Realm? Do you have a full example you can post? |
Hi @tarasmorskyi-mediamonks I can reproduce your issue. We'll look into it, in the meantime you can use the following workaround realm.writeBlocking {
copyToRealm(sampleEntity).run {
copyToRealm(SampleChildEntity().apply {
childId = "1"
title = "one"
}).also { children.add(it) }
copyToRealm(SampleChildEntity().apply {
childId = "2"
title = "two"
}).also { children.add(it) }
}
} |
A fix has been shipped in v0.3.2. Please reopen the issue if the problem still persists. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If I have a model with RealmList in it the list is not getting copied into realm as any other field does. Example of used model:
class SampleEntity : RealmObject {
@PrimaryKey
var productId: String = ""
var price: Double = 0.0
var children: RealmList = RealmList()
}
The text was updated successfully, but these errors were encountered: