Friday, 17 February 2012

What is the difference between the session.get() method and the session.load() method? | Java Hibernet

Both the session.get() and session.load() methods create a persistent object by loading the required object from the database. But if there was not such object in the database then the method session.load(..) throws an exception whereas session.get(&) returns null.

No comments: