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
{{ message }}
Repository navigation
Support serialization for property that is an object #1069
Translation: Hello, I hope that the custom type can better support binary and improve the speed. Can you refer to https://github.com/twitter/Serial
This makes it more convenient to insert and read the field into a custom model faster
changed the title [-]您好,我期望自定义类型 能更好的支持二进制,提高速度,是否可以参考 https://github.com/twitter/Serial[/-][+]I hope that the custom type can better support binary and improve speed[/+]on Apr 21, 2022
If this is about completely replacing the class model (e.g. classes annotated with @Entity containing fields that are properties) then I don't think this makes sense. ObjectBox already uses a binary format behind the scenes (FlatBuffers) to store objects. Could you elaborate on your idea then?
If this is about completely replacing the class model (e.g. classes annotated with @Entity containing fields that are properties) then I don't think this makes sense. ObjectBox already uses a binary format behind the scenes (FlatBuffers) to store objects. Could you elaborate on your idea then?
Translation: The key performance lies in how to convert the binary and how to completely deserialize the persistent binary without the problem of compatible fields. The industry has cryo flatbuffers, etc. My scenario is UserPo.xxxField is an object
changed the title [-]I hope that the custom type can better support binary and improve speed[/-][+]Support serialization for property that is an object[/+]on May 2, 2022
Activity
[-]您好,我期望自定义类型 能更好的支持二进制,提高速度,是否可以参考 https://github.com/twitter/Serial[/-][+]I hope that the custom type can better support binary and improve speed[/+]ivahnenkoAnna commentedon Apr 21, 2022
Thank you for the feature request. We are looking into this and will reply as soon as possible.
greenrobot-team commentedon Apr 25, 2022
You can already store byte arrays in an object, see built-in support for types: https://docs.objectbox.io/advanced/custom-types#objectbox-supported-types
If this is about completely replacing the class model (e.g. classes annotated with
@Entitycontaining fields that are properties) then I don't think this makes sense. ObjectBox already uses a binary format behind the scenes (FlatBuffers) to store objects. Could you elaborate on your idea then?NBXXF commentedon Apr 27, 2022
关键性能在于转二进制 以及持久化的二进制如何完整反序列化 不出现兼容字段问题,行业有cryo flatbuffers 等
我的场景是 UserPo.xxxField 是一个对象
Translation: The key performance lies in how to convert the binary and how to completely deserialize the persistent binary without the problem of compatible fields. The industry has cryo flatbuffers, etc. My scenario is UserPo.xxxField is an object
[-]I hope that the custom type can better support binary and improve speed[/-][+]Support serialization for property that is an object[/+]greenrobot-team commentedon May 2, 2022
Using the current ObjectBox API this should be solvable in a technology independent way using
@Convertand aPropertyConverterthat de/serializes objects. https://docs.objectbox.io/advanced/custom-types#convert-annotation-and-property-converterE.g. you could write a converter that uses https://github.com/twitter/Serial as you suggested.