-->
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: How to change the default FetchType to LAZY
PostPosted: Thu Nov 18, 2010 11:06 am 
Newbie

Joined: Thu Nov 18, 2010 10:40 am
Posts: 1
Hi I am using the @ManyToOne association for the column join
as shown below

@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
@JoinColumn(name = "PROGRAM", unique = false, nullable = false, insertable = true, updatable = true)
protected Program getProgram() {
return this.program;
}


Almost all the class entities are using the same association. And i want to change the FetchType to LAZY. I know that the
default fetch type is EAGER for all OneToOne and ManyToOne. How can i change this default behaviour to point the FetchType to Lazy.
Can i do it in hibernatemapping config file. (hibernate-mapping.hbm.ftl).
if not where and how can i do it.
Thanks.


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.