[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3665) Easy-to-use method, to check if object has already been loaded
Markus Merder (JIRA)
noreply at atlassian.com
Wed Dec 17 08:19:38 EST 2008
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list