kill the crap in dating for men 2nd edition - Session saveorupdate not updating
I thought that for example say the current version in the DB was 2, and the item we are updating is version 1, so it would load the item with a version = 2.
This part is taken care of by Hibernate and is only relevant for the application developer when tuning the performance of the system.
just returns an uninitialized proxy and does not actually hit the database until you invoke a method of the proxy.
This is useful if you wish to create an association to an object without actually loading it from the database.
It also allows multiple instances to be loaded as a batch if If you do not know the identifiers of the objects you are looking for, you need a query.
Future versions of Hibernate can, however, provide special mass operation functions.