I have a simple model say
class A {
@Type(type = "com.vivek.persistence.ListAsSQLArrayUserType")
@Column(name = "string_array", columnDefinition = "text[]")
List<String> stringArray;
}
Now I want to search any item exists in the stringArray Column. I can do this simply using sql native query :
select * from A WHERE 'abc' = any(string_array)
But I am not able to figure out any way through Hibernate Criteria API. I have tried IN predicate but it simply do not work and return empty result. Any help would be appreciated.