Well if 'c.categoryIds' is an array as the name suggests you have to implement a user type for that too. Other than that, remvoe the quotes ' then Hibernate will pass the columns as argument to your function.