objectbox / objectbox/objectbox-java

Modify ToMany without loading all relation entities

Open
#510 2 comments 0 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

Currently, when you operate on a ToMany, an add or remove loads all entities.

Alternatively we should also have means to modify to-many relations without loading everything to avoid bloating memory (e.g. #392).

Ways to do it:

  1. Make ToMany lazy when it come to add and remove
  2. Provide methods to update relations outside of ToMany
  3. ?

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

Start by tracing how ToMany performs add and remove operations and where those operations load all relation entities. Review the related discussion in #392 and determine which approach can modify relations without loading everything; done means add and remove avoid unnecessary full relation loading while preserving correct relationship updates.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.