Monday 17 August 2015

Difference between get() and load() methods in Hibernate

What is the difference between get() and load(): The most important question for the interview's perspectives that what is the difference between get and load methods in Hibernate? Developers use both the functions when coding but most of them use them without knowing the pros and cons of these methods.
In this article we will try to make you understand the similarities and difference between hibernate load and get methods.

Similarities between load() and get() methods :
  1. The load() and get() both methods used to retrieve object (a row) from database.
  2. Syntax wise both load() and get() methods are same.
  3. load() method is older whereas get() is new, but both belongs to Hibernate API.
  4. load() and get() both methods belongs to Session interface.
To read full article about Difference between get() and load() methods in Hibernate visit Findnerd.
You can also ask questions and check your knowledge on Java by posting and giving answers of tech queries on our java developer forum

No comments:

Post a Comment