String q1Str = \"SELECT parent_id FROM meta WHERE st_id = \"+childIds+\";\"; Query q1 = em.createNativeQuery(q1Str); //q1.setHint(\"org.hibernate.cacheable\", true);
I think this happens when the queried table does not have a primary key.