objectbox-java icon indicating copy to clipboard operation
objectbox-java copied to clipboard

Grouping Multiple Unique

Open watermelons opened this issue 6 years ago • 1 comments

Right now, if I assign @Unique to multiple properties, it will check each property and throw if just one matches.

But is there a way to group these together?

For example: @Unique String firstName @Unique String lastName

Currently: put(new Name("James", "Hunt")) -> saved put(new Name("James", "Lee")) -> UniqueViolationException

Expected: put(new Name("James", "Hunt")) -> saved put(new Name("James", "Lee")) -> saved

watermelons avatar Mar 12 '19 22:03 watermelons

AFAIK this is not supported, you have to write your own checks for this.

There was some related discussion in #509. Also might be related to #448.

-Uwe

greenrobot-team avatar Mar 18 '19 07:03 greenrobot-team