That has been discussed, but under the name "Fetch profiles".
And always with a positive attitude :) So, yes - its a good idea,
and patches are welcome :)

/max

----- Original Message ----- 
From: "Ara Abrahamian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 22, 2002 7:29 PM
Subject: RE: [Hibernate] Road Map


> Btw while we're talking about eager loading or lazy loading things...
> how do you find the idea of providing a dynamic mechanism to specify at
> runtime for each scenario which parts should be loaded eagerly or
> lazily? I mean a simple LoadPolicy object passed to the session.load()
> method. Specifying lazy-load/blabla in the xml file is a very static and
> inflexible approach for different use cases.
> 
> Ara. 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> [mailto:hibernate-devel-
> > [EMAIL PROTECTED] On Behalf Of Christian Bauer
> > Sent: Sunday, December 22, 2002 3:46 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [Hibernate] Road Map
> > 
> > On 22 Dec (10:44), Gavin King wrote:
> > 
> > > I agree with this. It is the resposibility of the middle tier
> > > to fetch data. If it did not fulfil its part of the contract,
> > > we can't just have the web tier suddenly open connections to
> > > the database. That has all *kinds* of security implications.
> > >
> > > > I can't see any other decent way - the View layer should not
> > > > just assume it got the whole object model available to it...
> > 
> > BTW, using a ThreadLocal is OK in a three tier setup, thanks Gavin for
> > the pointer.
> > 
> > I'm not talking about opening "direct connections" to the database,
> but
> > I think we all agree, that if the View gets an Object from the
> Business
> > Facade, all properties of this object should be visible and available
> to
> > the View. They wouldn't be if the Hibernate Session is closed and lazy
> > collections are not initialized. Initializing the Collections in the
> > Business Layer would either mean:
> > 
> > a) Initializing all lazy loaded Collections in the Business Layer or
> DAO
> > with Hibernate.initialize() and serve them with their objects in the
> > usual methods, e.g. "getEmployerByOID()" would return the requested
> > Employer and all of its Employees already initialized, everytime.
> > Somehow, Lazy Loading doesn't make any sense at all.
> > 
> > b) Only load the lazy Collections when either a switch is triggered in
> > the Business Facade method "getEmployerByOID(boolean initAll)" or
> > another special method is called "getEmployerByOIDInitAll()".
> > 
> > Is there a c)?
> > 
> > I'm happy now with the ThreadLocal and a cleanup process at the end of
> > the requeast and just assume, that when I get an Employer from my
> > Business Facade, I can access all its properties.
> > 
> > Custom Data Transfer Objects and Data Transfer Maps would somehat
> remedy
> > this problem, but I don't like these patterns when using POJOs instead
> > of Entity Beans.
> > 
> > --
> > Christian Bauer
> > [EMAIL PROTECTED]
> > 
> > 
> > -------------------------------------------------------
> > This SF.NET email is sponsored by: Order your Holiday Geek Presents
> Now!
> > Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated
> Soap,
> > MP3 Players,  XBox Games,  Flying Saucers,  WebCams,  Smart Putty.
> > T H I N K G E E K . C O M       http://www.thinkgeek.com/sf/
> > _______________________________________________
> > hibernate-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to