The hibernate session has load method for retrieving a proxy without loading entire object, this is often uses when it is need to link parent and child entity. But what about updating proxy? For example:
MyEntity entity = session.load(MyEntity.class, 1l);
entity.setName("newName");
session.saveOrUpdate(entity);
It is expected here that only name
column will be updated for entity with id=1l
without loading entire entity. Is it true? Does this piece of code equals to sql execution like UPDATE MyEntity SET name = 'newName' where id = 1
or not?