objectbox / objectbox/objectbox-dart
@Unique: more on conflict options
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 1.2k
- Forks
- 162
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
Hello 👋
I ran into a problem with relationships that have a @Unique property. To be concise, an UPDATE strategy would be the solution. My problem has already been discussed in many PRs but not for objectbox-dart.
https://github.com/objectbox/objectbox-dart/issues/297
This PR concerned the REPLACE strategy. It works but my issue regarding this strategy is explained here: https://github.com/objectbox/objectbox-java/issues/1023#issuecomment-1014376019
@greenrobot-team But REPLACE doesn't automatically update the relations? If I have to check whether it got replaced during insert, then fix the relations manually it would be even more messy, I think.
After replacing duplications i end up with null relations which literally break my application.
https://github.com/objectbox/objectbox-java/issues/1023
So the UPDATE strategy would be a great solution.
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 reading objectbox-dart issue 297 and the linked objectbox-java issue 1023, including its discussion of REPLACE and relationship handling. Clarify the intended UPDATE conflict behavior for @Unique relationships and define acceptance criteria for preserving relations without null references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100