[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3348) loading context

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Dec 27 12:43:19 EST 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole updated HHH-3348:
--------------------------------

    Affects Version/s:     (was: 4.x)

> loading context
> ---------------
>
>                 Key: HHH-3348
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3348
>             Project: Hibernate Core
>          Issue Type: New Feature
>            Reporter: benjamin Leroux
>            Priority: Minor
>   Original Estimate: 224h
>  Remaining Estimate: 224h
>
> this proposal is for creating a loading context into hibernate
>  Let me explain:
>  On an application, we often hesitating between the two major strategies of loading (eager or lazy). But for some reason there has no good choice. In fact, it depends on the context. 
> So we do lazy loading and redefine some method with new request with some "join". In fact, it lead to complexity and decrease managability of the application.
> So my idea is to allow the definition of a context (like transactional context) where we we can put the loading strategie to adopt. 
> with annotation it could be very easy to define such context. Let see this exemple :
> Avec les annotations, cela pourrait conduire à une ecriture de ce style :
> @LoadingStrategie (type=eager from="Car" get={"driver"})
> public List<Car> getAllCarForDriving(){
> // Some fonctions
> }
> @LoadingStrategie (type=eager from="Car" get={"driver","passengers"})
> public List<Car> getAllCarForTravelling(){
> // Some fonctions
> }
> In the method getAllCarForDriving when we call a hql request on car it automaticaly get driver but in the method getAllCarForTravelling passengers and the driver is loaded.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list