objectbox / objectbox/objectbox-java

Partial objects or @Lazy

Open
#348 0 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
4.6k
Forks
311
PR merge metrics
No merged PRs in 30d

Description

Usually, ObjectBox is superfast and even a bigger numer of unused properties does not matter. For entities containing properties containing alot of data (e.g. large byte arrays, images, etc.), we might offer a convenient solution.

  1. Partial objects are classes that can be used almost like entities, but are read-only and are tied to an entity type. Those have only a subset of the properties.

  2. @Lazy on individual properties to load expensive properties lazily.

@Lazy advantages:

  • avoids another type and thus complexity

Partial objects advantages:

  • more memory efficient if there are alot of properties

Happy to get more input on this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reviewing the entity and property-loading APIs to determine whether partial objects or lazy properties fit the existing design; done would require a decided approach, implementation scope, and tests for large properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.