]
Anthony Patricio reassigned HHH-3665:
-------------------------------------
Assignee: Anthony Patricio
Easy-to-use method, to check if object has already been loaded
--------------------------------------------------------------
Key: HHH-3665
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3665
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.3.1
Reporter: Markus Merder
Assignee: Anthony Patricio
Priority: Trivial
Currently there is no easy-to-use-method to check if an entity is in session-cache
without loading it.
SessionImpl.getEntityUsingInterceptor checks this and could be used. It would be nice, if
there was a method like this in SessionImpl:
public boolean checkIfInCache(Class entityClass, Serializable id)
{
return getEntityUsingInterceptor(new EntityKey(id,
getFactory().getEntityPersister(entityClass.getName()), getEntityMode())) != null;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: