The difference between load () and get () in Hibernate:
Get (): Is the direct manipulation of the database, the ID gets the data encapsulated object, if there is no data to return null;
Load (): query in the session cache first, if the cache does not exist, then delay the query from the database, do not find a matching record, will throw a objectnotfoundexception. A no session exception is thrown if the session is closed in a deferred query
The difference between lazy loading and eager loading in hibernate:
Eager loading: querying the current table and other associated tables together, select has too many statements and requires frequent access to the database, which can affect the performance of the query. "Manytoone default eager Load"
Lazy load: queries only the table you are working on, does not automatically query the associated tables, and is efficient "onetomany default lazy Loading" with only one table in operation
The difference between load () and get () in Hibernate, the difference between lazy loading and eager loading