adspace


What is the difference between load() and get() method?

Answer Posted / Sameer Jha

In Hibernate, the load() method retrieves an object from the database by its primary key but does not initialize its lazy associations. The returned object may be a proxy object that needs to be initialized using the Hibernate Session's initialize() method. On the other hand, the get() method also loads the object with its lazy associations as soon as it is fetched.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is latest hibernate version?

493