[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3808) Manual fetching of associations

Shawn Clowater (JIRA) noreply at atlassian.com
Mon Mar 9 15:53:38 EDT 2009


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

Shawn Clowater commented on HHH-3808:
-------------------------------------

This is subtly different than the left join fetch of HQL and and the setFetchMode on the Criteria side right?  All you want to accomplish is that the properties are loaded during the initial fetch w/o having them specified in the main query as a left outer join?

If so, I'm all for it since we currently have to touch our entities after they've been loaded to ensure the properties we'll need are loaded.  I had a discussion with Gavin a long time ago in the forums around something like this.

> Manual fetching of associations
> -------------------------------
>
>                 Key: HHH-3808
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3808
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>            Reporter: Ovidio Mallo
>
> In performance critical parts of an application, batch fetching and subselect fetching not always allow for an efficient and specific prefetching of entity associations. Therefore, I wanted to propose to add some API which allows to prefetch a given association for a user defined set of entities. This could be something like
>     Session#fetch(Class ownerClass, Serializable[] ownerIds, String propertyName)
> or
>     Session#fetch(Class ownerClass, Object[] owners, String propertyName)
> or something similar. The method would then load the association for the given entities (just like batch fetching would do) and put the associations in the session cache for later usage.
> I think this would greatly help when performance really matters and you want to have full control about the set of entities on which an association is fetched.

-- 
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