Skip to content
Advertisement

Spring Boot Jpa specification Set Enums IN Set Enums

Hi I want filter restaurant by type using Specification, but I get error:

Parameter value [SUSHI] did not match expected type [java.util.Set (n/a)]

How Can I comare List enums to list enums ? :/

My specification file:

JavaScript

Restaurant model:

JavaScript

Restaurant category:

JavaScript

Advertisement

Answer

Had the same problem and this question helped me.

In my case, I wanted to search my commissions by country. Here how I solved my issue.

Domain:

JavaScript

Specification code (@see findByCountries part):

JavaScript

}

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement