din*_*707 5 java hibernate jpa
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
| 归档时间: |
|
| 查看次数: |
3490 次 |
| 最近记录: |