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

Feature request : QueryCondition.relationCountGT / .relationCountLT

Open RobbWatershed opened this issue 3 years ago • 1 comments

First things first, I've really been enjoying the new query API as well as the new features of v3.5.0. That helps me building a cleaner and faster data layer. Thanks guys for listening to us~

I'd love to have two extra methods akin to the new relationCount query condition to check if the relation count is greater than or lower than a certain number; typically to test if entity X has existing relations (i.e. > 0) or if it reaches a given threshold.

Would that be possible ?

RobbWatershed avatar Jan 19 '23 12:01 RobbWatershed

Agreed that this feature request makes sense. (Internal note: the existing query condition could be extended by storing an enum to specify the operation.)

greenrobot avatar Jan 19 '23 12:01 greenrobot