Code example for Session

Methods: get

0
		Exception e, Session session, Object object) {
 
		if (e instanceof org.hibernate.StaleObjectStateException) {
			BaseModel<?> baseModel = (BaseModel<?>)object;
 
			Object currentObject = session.get(
				object.getClass(), baseModel.getPrimaryKeyObj());
 
			return new ORMException( 
				object + " is stale in comparison to " + currentObject, e);
		} 
		else { 
			return new ORMException(e);
		} 
	} 
 
} 
Experience pair programming with AI  Get Codota for Java