I would like to formally submit a Request For Enhancement :-)

It's not an issue for normal relationships between entities since we can
select out the List with a query.  But unless I'm mistaken there is no
API to load a component collection without loading its parent.  This
would provide an elegant solution to that problem.

I myself have several different use cases in multiple applications that
would benefit from this; I suspect the pattern is not uncommon.

Thanks,
Jeff Schnitzer

> -----Original Message-----
> From: Gavin King [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 15, 2003 10:29 PM
> To: Schnitzer, Jeff; [EMAIL PROTECTED]
> Subject: RE: [Hibernate] How smart is a proxy?
> 
> Nah, not that smart ;)
> 
> I must admit that I never considered the possibility of such
> a feature. Not sure if its feasible or not. Would certainly
> Require a bit or work to implement.
> 
> -----Original Message-----
> From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 16 January 2003 5:11 PM
> To: [EMAIL PROTECTED]
> Subject: [Hibernate] How smart is a proxy?
> 
> 
> Lets say I have a persistent object that implements an interface like
> this:
> 
> class Foo
> {
>       public Long getId();
> 
>       public List getBars();
>       public void setBars(List value);
> }
> 
> Bar is another persistent object.  Now lets say I execute this code:
> 
> Foo f = sess.load(Foo.class, someId);
> List bars = f.getBars();
> 
> The question is:  Does the Foo object get loaded from the database?
Or
> can the Hibernate proxy load the 'bars' collection without the extra
> database hit of loading the parent object?
> 
> Thanks,
> Jeff Schnitzer
> [EMAIL PROTECTED]
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: A Thawte Code Signing Certificate
> is essential in establishing user confidence by providing assurance of
> authenticity and code integrity. Download our Free Code Signing guide:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en
> _______________________________________________
> hibernate-devel mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> 
> 
> ********** CAUTION - Disclaimer **********
> This message may contain privileged and confidential
> information. If you are not the intended recipient of this
> message (or responsible for delivery of the message to
> such person) you are hereby notified that any use,
> dissemination, distribution or reproduction of this message
> is prohibited. If you have received this message in error,
> you should destroy it and kindly notify the sender by reply
> e-mail. Please advise immediately if you or your employer
> do not consent to Internet e-mail for messages of this kind.
> Opinions, conclusions and other information in this
> message that do not relate to the official business of
> Expert Information Services Pty Ltd ("The Company")
> shall be understood as neither given nor endorsed by it.
> 
> The Company advises that this e-mail and any attached
> files should be scanned to detect viruses. The Company
> accepts no liability for loss or damage (whether caused
> by negligence or not) resulting from the use of any
> attached files.
> **EIS******** End of Disclaimer **********
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: A Thawte Code Signing Certificate
> is essential in establishing user confidence by providing assurance of
> authenticity and code integrity. Download our Free Code Signing guide:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-------------------------------------------------------
This SF.NET email is sponsored by: A Thawte Code Signing Certificate
is essential in establishing user confidence by providing assurance of
authenticity and code integrity. Download our Free Code Signing guide:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to