-
Notifications
You must be signed in to change notification settings - Fork 87
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
Support embedded objects #662
Comments
Hi Lukasz Great to see you here. Yes, we plan to support embedded objects. There are a number of major and minor features we are still missing.
comes to mind. In general the Flutter / Dart SDK will support all features, supported by the other SDKs, unless the feature is considered deprecated. However, we cannot give exact timelines for when each feature will land.. Br, Kasper |
Sorry about that. Will close when Embedded objects land. |
Thanks for the detailed answer. Understandable for not having a specific timeline. |
Is there any sort of documented workaround for this gap at the moment? It basically means the SDK is not usable for my database schema at the moment. |
There are no workarounds at this point. |
I'm also waiting for "Embedded objects" to switch to Realm! |
Afternoon, just wondering if there are any updates on embedded objects / arrays? Hope you are all well |
As you know I'm really not allowed to give ETAs. I can say that we intend to make more incremental releases than we have in the past, and that embedded objects are high on our agenda. In the meantime, consider if it is possible to either use full-blown realm objects, or serialise in-and-out of a String (fx.) |
Thanks @nielsenko appreciate and appreciate your update! |
This is done and will be released shortly |
Hello everybody! First, thanks for updating the lib with the specification of enbedded objects. I would like your help regarding the use of the resource. I'm trying to synchronize the schema, but it's generating an error when doing the process. I have 2 separate classes to handle the data and the relationship with the embedded object, but when building the app, an error message is returned. @RealmModel()
@MapTo('person')
class _Person {
late String name;
@MapTo('address')
_Address? personAddress;
}
// The generated `Address` class will be an embedded object.
@RealmModel(ObjectType.embeddedObject)
class _Address {
late String street;
late String city;
} Part of the generated file: // ...another properties
SchemaProperty('address', RealmPropertyType.object, mapTo: 'address', optional: true, linkTarget: 'Address'), When I start the application, the message below is displayed:
I've run on several emulators (Ios and Android), devices (Asus, Iphone 12, Xiaomi), but in all of them the error is persisting. Is there a process I'm missing? Thanks! |
How does your code look for creating the configuration and opening the realm? BTW: It is typically better to open a new issue. |
Just saw this was closed but cant see a new issue raised yet so thought we would pop here: @nielsenko we have also seen similar behaviour - to get around this we had to included the 'embedded object' inside |
So I will open a new issue as you suggested. Thank you for your help. |
That is correct, you need to add the @dotjon0 I see your point, but that is a current requirement. Embedded objects are not that different from top level objects internally in realm-core. But we should be able help you add the transitive closure of all dependencies. |
So I will do as you suggested. At creation I was not including the Address schema in the settings. final config = Configuration.flexibleSync(
user,
[
Person.schema,
],
); Thanks a lot for the help @nielsenko and @dotjon0. |
@nirinchev thanks for confirmation - ive raised a feature request #1001 to support not having to place 'embedded objects' within the Configuration. @ffelicioautodoc pleasure. Have a good evening both. |
@nielsenko what do you mean by "But we should be able help you add the transitive closure of all dependencies." ? |
Thanks for the mention @dotjon0 Good evening and thanks again for your help. |
Is it planned at some point? Thanks
The text was updated successfully, but these errors were encountered: