Hibernate - Session Load & get

Session.load():

  • It is return a proxy value without hitting database.
  • If now row found, throw an ObjectNotFound Exception.
  • It is an object.
Session.get():
  • Always hit the database and return real object.
  • If no row, it return null.

Comments

Popular posts from this blog

How to set Java Object into JaxBElement ?

GitLab