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
The current approach for sending over Realm object information between the plugin and the device has variety of issues.
A new implementation should likely address multiple existing issues at once. Based on the summary of previous issues, here are some possible considerations for the new implementation:
Wrap serialised Realm Objects with parent objects that store i.e. _pluginObjectKey rather than introduce those fields to the serialised object itself (as described by Special property names #86 and fixes Object Key in data inspector #93)
In the wrapper of the serialised object being sent over to the plugin (or other place that may make more sense), include information that can be used to derive types of i.e. mixed fields. (fixes Type erasure and support for mixed #84)
When sending an object that has a linked object, it would be enough to send the objectKey (and primaryKey if present). The primaryKey could be used to nicely render the linked objects in the table. (fixes Flattening of linked objects #85).
The current approach for sending over Realm object information between the plugin and the device has variety of issues.
A new implementation should likely address multiple existing issues at once. Based on the summary of previous issues, here are some possible considerations for the new implementation:
_pluginObjectKey
rather than introduce those fields to the serialised object itself (as described by Special property names #86 and fixes Object Key in data inspector #93)toJSON
serialiser to avoid circular dependency issues (fixes Circular references #96). With newtoJSON
implementation from Improve toJSON functionality and remove JSONSerializerReplacer realm-js#4997, it should now be easier to represent and serialize Realm objects as plain JavaScript objects which will hopefully ease some complexity.The text was updated successfully, but these errors were encountered: