相关疑难解决方法(0)

Aliases expected length is 0; actual length is 1 on hibernate query cache

String q1Str = "SELECT parent_id FROM meta WHERE st_id = "+childIds+";";
Query q1 = em.createNativeQuery(q1Str);
//q1.setHint("org.hibernate.cacheable", true);
Object parentId = null;
try{
parentId = q1.getSingleResult();
}catch(NoResultException nre){
    //nope
}
Run Code Online (Sandbox Code Playgroud)

enabling hibernate.cacheable will throw me the following exception

aliases expected length is 0; actual length is 1

java hibernate jpa

5
推荐指数
1
解决办法
3490
查看次数

标签 统计

hibernate ×1

java ×1

jpa ×1