Difference Between load() , get() and persist() method?

Answer Plz


3 Answers
1-3 of  3
3 Answers
  • http://stackoverflow.com/questions/5862680/whats-the-advantage-of-persist-vs-save-in-hibernate check out

  • 1.When you call session.load() method, it will always return a “proxy” object,proxy means, hibernate will prepare some fake object with given identifier value in the memory without hitting the database.
    2.When you call session.get() method, it will hit the database immediately and returns the original object.
    3.persist() gives guarantees that it will not execute an INSERT statement if it is called outside of transaction boundaries. This is useful in long-running conversations with an extended Session/persistence context.

Hibernate

Didn't get the answer.
Contact people of Talent-Hibernate directly by clicking here