-->
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.  [ 2 posts ] 
Author Message
 Post subject: SPRING HIBERNATE BEST WAY TO TRANSFER OBJECTS TO VIEWS
PostPosted: Sat Dec 09, 2017 3:53 am 
Newbie

Joined: Fri Dec 08, 2017 6:00 am
Posts: 4
Currently i am using fetchtype.eager in spring mvc using hibernate to transfer objects to show or use in spring views and controllers.but one of my friend said it increases the load and instead of that use lazy.but with lazy objects are not avilable in jsps .and unable to load child objects like one to amny many to many e.t.c.Can somebody advise me the best way (standard spring mvc using service DAO implementation pattern) to do this.

Thanks in advance sri


Top
 Profile  
 
 Post subject: Re: SPRING HIBERNATE BEST WAY TO TRANSFER OBJECTS TO VIEWS
PostPosted: Sat Dec 09, 2017 6:50 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
You're friend is right. EAGER fetching is bad for performance.

To know how to best handle LAZY associations you should read:

- this article about the LazyInitializationException
- this one about DTO projections


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.