GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support serialization for property that is an object · Issue #1069 · objectbox/objectbox-java

Support serialization for property that is an object #1069

New issue
Copy link
New issue
Copy link
Open
Open
Support serialization for property that is an object#1069
Copy link
Labels
enhancementNew feature or requestNew feature or request

Description

@NBXXF
NBXXF
opened on Apr 20, 2022
Issue body actions

您好,我期望自定义类型 能更好的支持二进制,提高速度,是否可以参考 https://github.com/twitter/Serial
这样更方便的将字段是自定义模型 更快插入和读取

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

Activity

  1. NBXXF
    added
    enhancementNew feature or requestNew feature or request
    on Apr 20, 2022
  2. ivahnenkoAnna
    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
  3. ivahnenkoAnna commented on Apr 21, 2022

    @ivahnenkoAnna
    ivahnenkoAnna
    on Apr 21, 2022
    Contributor
    More actions

    Thank you for the feature request. We are looking into this and will reply as soon as possible.

  4. greenrobot-team commented on Apr 25, 2022

    @greenrobot-team
    greenrobot-team
    on Apr 25, 2022
    Member
    More actions

    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 @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?

  5. greenrobot-team
    added
    more info requiredFurther information is requestedFurther information is requested
    on Apr 25, 2022
  6. NBXXF commented on Apr 27, 2022

    @NBXXF
    NBXXF
    on Apr 27, 2022
    Author
    More actions

    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 @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?

    关键性能在于转二进制 以及持久化的二进制如何完整反序列化 不出现兼容字段问题,行业有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

  7. greenrobot-team
    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
  8. greenrobot-team
    removed
    more info requiredFurther information is requestedFurther information is requested
    on May 2, 2022
  9. greenrobot-team commented on May 2, 2022

    @greenrobot-team
    greenrobot-team
    on May 2, 2022
    Member
    More actions

    Using the current ObjectBox API this should be solvable in a technology independent way using @Convert and a PropertyConverter that de/serializes objects. https://docs.objectbox.io/advanced/custom-types#convert-annotation-and-property-converter

    E.g. you could write a converter that uses https://github.com/twitter/Serial as you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.