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: Default FetchType
PostPosted: Wed Nov 03, 2010 12:43 pm 
Newbie

Joined: Wed Nov 03, 2010 12:38 pm
Posts: 2
Dear Hibernate Users,

Can someone tell me what is the default fetching mode for hibernate and which is more important is there a way to change it somehow for all the entities in a single configuration file?

Thank you in advance, Peter B.


Top
 Profile  
 
 Post subject: Re: Default FetchType
PostPosted: Thu Nov 04, 2010 6:06 am 
Newbie

Joined: Wed Nov 03, 2010 12:38 pm
Posts: 2
Hi,

The reason why I am asking because right now we are porting from toplink to hibernate. In toplink the default behavior was the lazy loading but it seems that the hibernate by default does eager fetching. We would like to avoid to change it by putting an annotation on all the relations because we have a lot.

thnx: BP


Top
 Profile  
 
 Post subject: Re: Default FetchType
PostPosted: Thu Nov 04, 2010 6:34 pm 
Beginner
Beginner

Joined: Tue Oct 26, 2010 6:12 pm
Posts: 29
Quote:
...but it seems that the hibernate by default does eager fetching.


AFAIK, unless you are using Hibernate as your JPA provider, the default fetch mode is lazy (JPA's default fetch mode is eager).
http://docs.jboss.org/hibernate/core/3. ... e-fetching


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.