Hi, I am not that much familiar with hibernate.I had a Adversion table. In adversion mapping file I had specified lazy ="false" for 6 properties. I am trying to retrive the Adversion object using primary key.
It is loading all the child objects. I just want to load only one of the child object out of 6 eventhough lazy property is set in hbm file.
If you have defined lazy loading as false in your mapping you can't override this in code. When you get one object, you always get whatever is associated where the association is defined with lazy=false.
You can do this the other way round though. Set lazy=true and "eagerly fetch" results from your query when you want to. When you don't, nothing extra will come back.