Maybe I misunderstood the semantics of get and merge in hibernate, but if I do this (in a Spring method controller, so using service and dao layers):
ClassMy a = service.get(234, ClassMy.class) (this loads the object using session.get)
a.setPropertyX("test");
this will not result in a automatic update. Instead, if I already had "a" in memory I would do:
a = (ClassMy) service.merge(a);
a.setPropertyX("test");
this results in a update.
Do I have to merge the object after loading it with get? Sounds so strange...