• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting specific data with lazy=false in hibernate

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Lazy=false populates all the referenced objects as well. What if I want to have lazy=false in hbm files and at the same time I want specific values to be populated for object and anot the referenced objects. For example if I have an object employee and another object named manager. There is a relationship between manager and employee and lazy=false. Now if I want to load employee, it will also load manager. I want to load the details of employee only while still having lazy=false. I know there is a way by doing something with the constructor but I have forgotten it. Can anyone help me.

Thanks in advance.
 
reply
    Bookmark Topic Watch Topic
  • New Topic