[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3348) loading context
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Dec 27 12:45:19 EST 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole resolved HHH-3348.
---------------------------------
Resolution: Rejected
How is this different from the notion of fetch profiles?
> 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