0

我正在为我的查询使用条件对象。我使用的参数之一是字符串列表(例如 [10, 11, 15])。

由于某种原因,当生成 SQL 查询时,这些值现在是 15、11、15。

从代码:

// I have method that receives a String[] types as parameter
// inside the method:

Criteria criteria = new Criteria();
List<String> listTypes = Arrays.asList(types);
criteria.setParameter("types", listTypes);

// and the query
select a from table a where a.types in (:types)

有没有人有同样的问题?为什么价值观会改变?

4

0 回答 0