java - Unknown Mapping Entity at session.bynatural ID in Hibernate 4.3 +Spring 4 + Teneo 2.1 -
i have upgraded hibernate (3 4.3.8) , spring (3.0.6 4.0.6) , teneo (1.2 2.1) in application. every thing related db working fine apart below api
session.bynaturalid(cl).using( constants.object_id, objectid).getreference();
it throws
hibernate mapping exception : unknown mapping entity [classname]
but @ same time, in same environment below apis working fine.
1)
criteria criteria = session.createcriteria(cl).add(restrictions.eq(constants.object_id, objectid)); criteria.setcacheable(true); list<t> list = criteria.list(); if(list != null && !list.isempty()) obj = list.get(0);
2) obj = (t) session.get(classname, id);
i don't understand why it's behaving this.
thanks in advance!..
Comments
Post a Comment