I am pretty sure I should be able to use a fetch join to do this, however, I can't seem to get it to work with my Flex app. No matter how I write the query it still seems to get initialized via multiple select statements. I'll look into this a little more. possibly there is something I am doing wrong.
FROM HIBERNATE http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html In addition, a "fetch" join allows associations or collections of values to be initialized along with their parent objects, using a single select. This is particularly useful in the case of a collection. It effectively overrides the outer join and lazy declarations of the mapping file for associations and collections. See Section 19.1, âFetching strategiesâ for more information. from Cat as cat inner join fetch cat.mate left join fetch cat.kittens - Kevin --- In [email protected], "Jeff Vroom" <[EMAIL PROTECTED]> wrote: > > I don't think LC DS is doing anything funky to override how hibernate > does the query. We just are accessing the "cat.kittens" property to > pull out the identities of the kittens even with lazy="true". I don't > know enough about hibernate to know how to get it to query kittens and > cats in the same select statement. > > > > Of course in 2.6 (now in beta) we have the load-on-demand and page-size > properties you can set on the association tag so we avoid fetching > cat.kittens altogether until it is accessed on the client. > > > > Jeff > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Kevin > Sent: Monday, February 11, 2008 5:55 PM > To: [email protected] > Subject: [flexcoders] Does the LCDS HIbernate Assembler override fetch > joins in HQL queries? > > > > I am working with a bunch of named hql queries in Hibernate and it > seems to me that no matter how I write the query the properties are > still lazy loaded via my associations in the destinations files. > > For example if I create a query, > > select cat from Cat cat left join fetch cat.kittens .... > > kittens will still be lazy loaded if I have my association between cat > & kittens as lazy. The explicit fetch in the query is ignored. > > I would be interested to know if anyone else has come across this > limitation? > > - Kevin >

