I know that this is a common question that was described a lot of times.
But still I can’t get some thing – what about performance? Which method is faster?
Actually, I need a simple thing: the page makes a POST-request: id=0, name=’John’. The server-side script should check if id=0, then create a new record in DB, otherwise update existing.
I think that get() is more usefull for me because it will return a NULL in case of record is not exists in DB, while load() can return some temproray object.. Am I right?
Thank you
Here’s a link to the equivalent question in the Hibernate forum which was the first result in my google query (
Hibernate load vs get): https://forum.hibernate.org/viewtopic.php?p=2387456There it states the following: