What is the difference between load
and get
methods of Session
in Hibernate?
load() will throw an unrecoverable exception if there is no matching database row.
get() will return null if there is no matching database row.
Why did Hibernate Creators kept this Method load in the API? (As it throws an unrecoverable exception if the Object isn't found). Isn't get()
sufficient?