Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Hibernate 'fetch' Clause Ineffective

Avatar

Avatar
Level 1
mgd134
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
mgd134
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
mgd134
Level 1

11-09-2009

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.