adspace


Difference between get() vs load() method in hibernate?

Answer Posted / Shameem Alam

The main difference between Hibernate's Session.get() and Session.load() methods lies in their behavior when a persistent object with the given id is not found in the database. The get() method will return null if the object is not found, whereas the load() method will throw an exception (ObjectNotFoundException).

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