I have simple example: to find all items that are sold out.
Item has initialQuantity and soldQuantity integer fields. (for some reason I need initialQuantity stored)
I'm trying to do something like:
builder = new BooleanBuilder();
Predicate predicate = builder.and(item.initialQuantity.eq(item.soldQuantity)).getValue();
Iterable<Item> iterable = itemRepository.findAll(predicate);
but it does not return as expected. ".eq()" looks like it expects an integer and not Path<>