我有这个在我的postgres数据库上运行的SQL
SELECT * FROM unnest(ARRAY['a','b','c']) LEFT JOIN (SELECT 'x') a ON (true)
现在我想在我的hibernate应用程序中使用它
String[] enumStrings = EnumUtils.getEnumMap(Language.class).keySet().toArray(new String[]{});
String sql = "SELECT * FROM unnest(ARRAY[:languages]) LEFT JOIN (SELECT 'x') a ON (true) ";
SQLQuery query = getCurrentSession().createSQLQuery(sql);
query.setParameterList("languages", enumStrings);
List result = query.list();
但我得到了一个例外
a column definition list is required for functions returning "record"
如何使用hibernate SQLQuery重构我的查询?