objectbox / objectbox/objectbox-java
Improve relations to play nicer with server APIs (e.g. Retrofit, GSON, Jackson, Moshi, ...)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 311
- PR merge metrics
- No merged PRs in 30d
Description
If you get object data from another source (e.g. server) you can make those data objects also ObjectBox entities. One thing has to be considered: relations on ObjectBox currently rely on ToOne and ToMany types, which 3rd party libraries are not aware of.
A quick work around would probably be to walk through the object graph and replace List objects with ToMany objects.
However, we could also look into supporting plain java.util.Lists in some way. A put would have to detect the type and do some additional syncing to figure out what to do. Or maybe just plainly put all objects in the list?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing how ObjectBox handles ToOne, ToMany, plain java.util.List, and put operations, then compare the possible approaches for objects from Retrofit, GSON, Jackson, or Moshi. Done would mean a defined and implemented way for server-mapped objects and their relations to work without requiring third-party libraries to understand ObjectBox types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100