-->
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.  [ 3 posts ] 
Author Message
 Post subject: from clause fetch join
PostPosted: Thu Apr 01, 2004 7:09 pm 
Beginner
Beginner

Joined: Wed Feb 25, 2004 10:58 am
Posts: 43
I have query like this

select user from User user left join fetch user.Group.roles where user.userId = :pk

When there are no associations to roles in the database from group to roles , I end up getting a LazyInitializationException . I specified that the roles should be lazy loaded in the Group mapping file . If I uses lazy loading with fetch .. does this mean there needs to be an association at the database level , in my case a Group must have a role ? Any way around this problem ?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 1:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
mapping please

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 4:01 pm 
Beginner
Beginner

Joined: Wed Feb 25, 2004 10:58 am
Posts: 43
Thanks alot , I posted the mappings @the following post

http://forum.hibernate.org/viewtopic.ph ... 37#2197237


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

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.