I have simple example: to find all items that has a category with priority > 1 and active = true .
Item has a list of categories, each has an int field called priority. I'm trying to do something like:
builder = new BooleanBuilder();
Predicate predicate = builder.and(item.categories.any(category.priority.goe(1).and(category.active.eq(true))));
Iterable<Item> iterable = itemRepository.findAll(predicate);
but i cannot find the right method to use? Can someone pls advise?