}
else {
Criteria criteria = session.createCriteria( entityInfo.clazz );
criteria.add( Restrictions.eq( entityInfo.idName, entityInfo.id ) );
try {
maybeProxy = criteria.uniqueResult();
}
catch ( HibernateException e ) {
throw new SearchException(
"Loading entity of type " + entityInfo.clazz.getName() + " using '"
+ entityInfo.idName