You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use kotlin realm sdk for Flexible Sync.
For standard Realm object like this it's work perfect:
open class SomeClass(
@PrimaryKey var _id: String = "",
var _partition: String = "",
var card: String? = null,
) : RealmObject
But for embedded object
open class SomeClass(
@PrimaryKey var _id: String = "",
var _partition: String = "",
var card: Card? = null,
) : RealmObject
open class Card(
var cardNumber: String? = null,
var isPrivateCard: Boolean? = null,
var uuid: String? = null
) : EmbeddedRealmObject
I can't pass Card:class to SyncConfiguration like bellow, cause schema argument only takes set of RealmObject, not BaseRealmObject.
SyncConfiguration.Builder(
user = getCurrentUser(),
schema = setOf(SomeClass::class, Card::class)
)
But if I add only SomeClass:class
SyncConfiguration.Builder(
user = getCurrentUser(),
schema = setOf(SomeClass::class)
)
I will receive the following error and app crash:
Caused by: io.realm.kotlin.internal.interop.RealmCoreLogicException: [18]: Schema validation failed due to the following errors:
2022-07-29 17:07:53.490 11177-11177/my.app.dev E/AndroidRuntime: - Property 'SomeClass.card' of type 'object' has unknown object type 'Card'
Looking forward for your help 😀
The text was updated successfully, but these errors were encountered:
Hi @klamborowski Thank you for reporting this. This is an unfortunate bug in our SyncConfiguration that wasn't caught for some reason. We should have a patch ready in a day or two. Sorry for the inconvenience.
Hi 👋
I'm trying to use kotlin realm sdk for Flexible Sync.
For standard Realm object like this it's work perfect:
But for embedded object
I can't pass Card:class to SyncConfiguration like bellow, cause schema argument only takes set of RealmObject, not BaseRealmObject.
But if I add only SomeClass:class
I will receive the following error and app crash:
Looking forward for your help 😀
The text was updated successfully, but these errors were encountered: