CODEXE

Get vs Load

1.session.get() loads data from database as soon as it is called while session.load() won't touch the database and it will return a proxy object.

2.Use get() to test whether some data exist in the database. If not, it will return a null. When we use load(), we should make sure the data exists because it will throw an exception when the data is no found.