0
我使用JPA条款与获得从表中的结果,但例外下面面临:如何在JPA中使用IN子句?
ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Fail to convert to internal representation
PFB我的代码:
public interface ObjectCommonDao extends JpaRepository<ObjectCommon, Long> {
@Query("select oc from ObjectCommon oc where oc.id in :listObjects")
List<ObjectCommon> getListSelectedObject(@Param("listObjects") List<Long> listSelected);
}
可否请你让我知道如何使用IN子句上面的查询来获取行的列表。
是 '身份证' ObjectCommon的定义为龙场? – Stan
发布实体以及异常的完整堆栈跟踪 –
是的。 Id字段很长。 –