【发布时间】:2015-03-16 13:29:30
【问题描述】:
这里的第一个问题:
我正在使用 DB2 和 Java Hibernate 标准。
我需要一种在 where 子句中使用子查询并能够在子查询中使用 IN 的方法。但我似乎找不到解决方案。
这就是我现在拥有的:
criteria.add(Restrictions.sqlRestriction("{alias}.arnrmb in (select arnrvb from faarvb where mgnrvb in ?)", getWarehouses().toArray(), typeArray));
我得到这个错误:
2015-03-16 14:07:13,566 [ERROR] (SqlExceptionHelper:147) - Descriptor index not valid.
谁能帮忙?
【问题讨论】:
标签: java hibernate db2 nhibernate-criteria