I'm using Spring JPA Query By Example to allow dynamic filters. However I notice that if the example object has all the values set a null, the example query returns all the values of the table.
I cannot add mandatory field, since the queries must be complete dynamic, also pagination is not an option.
Therefore I wanted to ask if there is a way to tell JPA that if all the values in the probe example are null to return a error o execute some kind of fall back operation.
1条答案
按热度按时间dced5bon1#
No, such a setting does not exist, you'd have to check that yourself up front.