Difference between get() vs load() method in hibernate?
Answer / 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 |
How do you hibernate?
Is merge better than update?
What is lazy and eager initialization?
What is embeddable in hibernate?
What is the default fetch type in hibernate?
What is orm tool in hibernate?
Is hibernate framework good?
What is hibernate and how it works?
What are the Core interfaces of Hibernate framework?
What is Hibernate SessionFactory and how to configure it?
How many objects are there in hibernate architecture?
What is version property in hibernate?