[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3665?page=c...
]
Markus Merder commented on HHH-3665:
------------------------------------
I guess, I can use session.contains(). Sorry, I don't know, why I did not find it. You
can delete this issue.
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
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:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira