I want to retrieve data from this query. But this query works if col has only one value. If there is 2 or more value it doesn't work.
@Query(value="SELECT * FROM art where color @> ARRAY[:col]",
nativeQuery=true)
List<Recept> findBy( @Param("col") Set<Integer> col);
By hibernate I see the query. this one works fine.
Hibernate: SELECT * FROM art where color @> ARRAY[(?)]
While this doesn't work. ERROR: operator does not exist: integer[] @> record[]
Hibernate: SELECT * FROM art where color @> ARRAY[(?, ?)]
I think the problem is in brackets.