permaculture playing cards*
The moose likes Object Relational Mapping and the fly likes is there a way to pull in all child objects? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "is there a way to pull in all child objects?" Watch "is there a way to pull in all child objects?" New topic
Author

is there a way to pull in all child objects?

mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

Hi, i am new to hibernate when i start my first program i got lazy initialization exception, some one suggested me to change the fetch.LAZY annotation in fetch.EAGER the problem is solved for now. Due to that change i think i stuck with another one i have around 10 classes and for the server i need everything loaded.I was avoiding using FetchType.EAGER as that meant its always eager and in particular the web front end loads everything - but perhaps that is the way to go - is there any thing to other than this. If yes please give me a valuable suggestion. Some one suggested me to use second-level cache is it solve my problem this is same as my previous post please help me.
Murali Ranga
Ranch Hand

Joined: Dec 16, 2011
Posts: 38
to work lazy loading for web views configure hibernate filter in web.xml
use Open Session In View pattern
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

Please give me some examples cause am new to hibernate.
Murali Ranga
Ranch Hand

Joined: Dec 16, 2011
Posts: 38
I searched on web ,I got this link
Using OpenSessionInViewFilter in Spring
http://cchweblog.wordpress.com/2009/10/10/using-opensessioninviewfilter-in-spring-web-application/
 
GeeCON Prague 2014
 
subject: is there a way to pull in all child objects?