adspace


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

Answer Posted / Dhirendra Pratap

In Hibernate, both load() and get() methods are used to retrieve objects from the database. However, there is a key difference between them:n
1. get(): This method returns a proxy object, which is loaded when one of its properties is accessed.
2. load(): This method also returns a proxy object but it forces loading immediately and returns an initialized object (without waiting for lazy initialization).

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