0

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.

Jens Schauder
  • 77,657
  • 34
  • 181
  • 348
Manotas
  • 41
  • 1

1 Answers1

0

No, such a setting does not exist, you'd have to check that yourself up front.

Jens Schauder
  • 77,657
  • 34
  • 181
  • 348