What is the difference between load() and get() method?
Answer / 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 |
Why we use hibernate?
What does hibernate.properties file consist of?
What is an api full form?
What is lazy loading hibernate?
Explain the mechanism by which you can distinguish between transient (i.e. Newly instantiated) and detached objects in hibernate?
What are persistent objects hibernate?
Why would you use an orm?
How many attributes are there in column annotation?
Why hibernate is used?
What is the use of transient?
What is the benefit of hibernate?
How to get single column from database using hibernate?