The expected length of an alias is 0; the actual length is 1 cache of the sleeping request

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;
parentId = q1.getSingleResult();
}catch(NoResultException nre){


the inclusion hibernate.cacheable

will throw me the following exception

the expected length of aliases is 0; actual length 1


source to share

1 answer

I think this happens when there is no primary key in the requested table.



All Articles