hibernate 为不带括号的数组生成代码

Loc*_*Oil 5 java postgresql spring hibernate jpa

我创建了一个方法

@Query(nativeQuery = true, value = "SELECT * FROM public.product WHERE concat(reg_id, inn, kpp, country) " + "alc_volume) ILIKE %?1% ORDER BY array_position(array[?2], id)")

List<Product> searchByPatternOrderId(String pattern, Set<Long> ids, Pageable pageable);
Run Code Online (Sandbox Code Playgroud)

hibernate生成了一段代码

SELECT * FROM public.product 
WHERE concat(reg_id, inn, kpp, country) ILIKE ? 
ORDER BY array_position(array[(?, ?, ?)], id) limit ? offset ?
Run Code Online (Sandbox Code Playgroud)

postgresql 返回语法错误。

  1. 我需要什么让休眠不为数组生成括号?
  2. 是否可以在任何地方禁用括号?