Following is my filter definition on an entity class
@FilterDef(name = "categoryIdFilter", parameters = [ParamDef(name = "categoryIds", type = "uuid-array")])
@Filter(
name = "categoryIdFilter",
condition = "category_id IN (:categoryIds)"
)
data class Product (
@Column(nullable = false)
@Id
val id: UUID,
@Column(nullable = false)
val categoryId: UUID
val name
)
And I am setting the filter in the following manner:-
categoryIds : List<UUID> categoryIds = getApplicableCategories()
val filter = session.enableFilter("categoryIdFilter")
filter.setParameterList("categoryIds", categoryIds)
But getting bellow error in the logs
org.hibernate.HibernateException: Undefined filter parameter [categoryIds]
What type to use for array of uuid ? and how to set it?