[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-13) Fetch groups

Sebastien Tardif (JIRA) noreply at atlassian.com
Sat May 29 19:52:56 EDT 2010


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

Sebastien Tardif commented on HHH-13:
-------------------------------------

GK said: the "fetch group" notion does not work with annotations

You can see an annotation example here:
http://openjpa.apache.org/builds/1.0.2/apache-openjpa-1.0.2/docs/manual/ref_guide_fetch.html#ref_guide_fetch_custom


> Fetch groups
> ------------
>
>                 Key: HHH-13
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-13
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.1 rc3
>            Reporter: Adrien
>
> I don't like JDO at all, but it may have a good feature : the fetch groups. Instead of saying in each request which relations (or property now) I want to be fetch, I could says which fetch groups I want to be loaded. I will be usefull for complex objects will lot of relationship. Each fetch group will represent a view to the object. 
> from Contract c 
>   left join fetch c.customer 
>   left join fetch c.items
>   left join fetch c.foo
> ==>
> from Contract c
>   left join fetch c.fetchGroup1
> with :
>   <many-to-one name="customer" fetch-group="fetchGroup1" />
>   <set name="items" fetch-group="fetchGroup1, fetchGroup2" >
>   <many-to-one name="foo" fetch-group="fetchGroup1" />
>   
>   Adrien

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