Expand my Community achievements bar.

Hibernate 'fetch' Clause Ineffective

Avatar

Level 1

I have a few assocations in my database defined to be lazily-loaded. It is my understanding from this page (http://docs.jboss.org/hibernate/stable/core/reference/en/html/queryhql.html#queryhql-joins) that if I put the word "fetch" before an object it will eagerly fetch that object.

This clause does not appear to do anything when working with a mx.data.DataService object connected to LCDS. I still get an ItemPendingError when I try to access the associated object. If I change the assocaition to be eagerly fetched in the hibernate mapping file I do not get the error. Is this clause not supported by the LCDS Hibernate Assembler?

I can post some code at some point if someone would like to see it. It would take a little work to clean it up and I'm hoping someone can shed a little light on this without it.

0 Replies