Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
Last week, we had the author of
TDD for a Shopping Website LiveProject
. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See
for the agenda and registration link
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Object Relational Mapping
How to fetch lazily loaded entities?
nitin pai
Ranch Hand
Posts: 185
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have a entity Dept within Employee entity. The Dept entity is set to lazy loading.
Any idea on how to do a emp.getDept() in the web tier when the DAO has long closed the session after the Employee was fetched?
Update: I am using Hibernate3 with Spring 2.0
[ November 25, 2008: Message edited by: nitin pai ]
Paul Sturrock
Bartender
Posts: 10336
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It sounds like the Session per request
pattern
is what you are after. Have a read of
this
.
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
I'm doing laundry! Look how clean this tiny ad is:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
one-to-one hibernate
ejbActivate() and ejbPassivate() methods are called million times!!! :(
Secondary table
Physical Data Modelling diagram - (1 - m) relationship
How to Represent dynamic Image data into XML
More...