What is difference between session get() and load() method in hibernate?
Answer / Babita Baghel
Session's get() method returns an object instance immediately, if it exists in the session cache or retrieves the object from the database. Session's load() method only loads the primary key data from the database; the object itself will be initialized and populated with data only when you try to access its properties.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to use union all in hibernate query?
What are different states of an entity bean?
What is column id?
What are the best practices to follow with hibernate framework?
Which type of associated entities are eagerly loaded by default?
How to enable logging (log4j) in hibernate?
What is the default annotation for a property in hibernate?
How to integrate Hibernate with Servlet or Struts2 web applications?
What is the difference between sorted collection and ordered collection, which one is better?
What is the use of session.lock() in hibernate?
What is the difference between jdbc and hibernate?
What is jpa in hibernate?