objectbox / objectbox/objectbox-dart
Add objects to ToMany by ID only
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 1.2k
- Forks
- 162
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
Hello,
It should be very useful to have inside ToMany class a method addId to add the entity reference directly by the id.
Now have just add that force the programmer to insert a whole entity.
But in many case what have are the ids and this force to load all the related entities before can add them as relations.
the ToOne already provide this function passing by targetId.
Thanks
Sam
Contributor guide
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
Start by inspecting the ToMany API and the existing ToOne targetId behavior. Determine how an ID-only addition should represent a related entity without loading it, then verify that the new API preserves relation behavior and does not require fetching all related objects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100