[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3665) Easy-to-use method, to check if object has already been loaded

Markus Merder (JIRA) noreply at atlassian.com
Fri Jan 16 10:25:38 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32149#action_32149 ] 

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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list