(1) Metadata-level fetching strategy does not effect HQL queries
(2) Distinctifying resultsets is expensive (performance), we recommend
   you do it yourself in memory, only when you need it!

Set results = new HashSet().putAll(query.list());

David Wood wrote:

Outer join fetching has never been good to me. Hibernate always seemed to ignore my OJ configuration settings and metadata, at least for where it mattered for me (on collections). Eventually I discovered the correct language in HQL queries to "force" it to happen: "from Parent as p left join fetch p.children".

This works, and at last my round-tripping ended. But what I got back from find() was unexpected; when a Parent has multilpe Children, I got multiple references to the Parent in the result List!

OK, sure, in a way it seems obvious... the SELECT returns extra rows, you get extra references. But it seemed like an unexpected violation of the illusion of Object-centrism that I had come to expect from Hibernate. I spent time today hunting through Loader but am still unsure if this is a bug or a feature. Any comments?


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel




--
Gavin King
+61 41 053 4454
+1 404 822 8349

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to