realm-dart
realm-dart copied to clipboard
Add support for embedded objects
Overview
This refactors our object hierarchy and extracts a base class - RealmObjectBase that is then implemented by RealmObject and EmbeddedObject (with AsymmetricObject coming as a follow-up). I've updated the API exposed on Realm to make sure the generic constraints are the correct ones (i.e. most of the times, they're constraints on RealmObject as embedded objects can't be queried or added directly).
TODO
- [x] Extract a RealmObjectBase type
- [x] Add support for embedded objects in the generator
- [x] Add support for embedded objects in accessors
- [x] Add support for embedded objects in the dynamic API
- [ ] Add support for get_parent
- [x] Tests
- [x] Generator
- [x] Links to embedded objects
- [x] Lists of embedded objects
- [x] Dynamic access
Fixes https://github.com/realm/realm-dart/issues/662