-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate JPA 1.0 multiple join fetch not supported?
PostPosted: Wed Nov 03, 2010 12:59 pm 
Newbie

Joined: Tue Oct 26, 2010 11:53 am
Posts: 4
All,

Setup: JPA 1.0 jars, TransactionType=JTA, TransactionAttribute=NOT-SUPPORTED for EJB3 SLSB

Issue: using EJBQL, if just one "left outer join fetch", the object and association are both initialized. If an additional join fetch is added, no association is initialized and I got LazyInitialization error when accessing.

e.g. select a from A a left outer join fetch a.B b
=> both a and b are fetched and initialized.
select a from A a left outer join fetch a.B b left outer join fetch b.C c
=> all a, b, c are fetched as shown in SQL displayed, however only a is initialized, thus accessing b gives an LazyInilization error.

Could any shed some light on this one?

Thanks,
- John


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.