AlmGhandi wrote:
If I understand your problem correctly, you change an attribute of the Contact entity which means, you do not change the Institution entity at all.
So, why should it create a new Version of the Institution entity in question?
Regards,
Frank
I just wanted to make life easier -:). Institution is the root object of these business entities; it has a Contact, and a Contact has Addresses. As the client always needs these objects together, the associations are marked for cascading.
So, the nice feature is, I can just say 'UpdateInstitution' and Hibernate does the rest. In my example it detects that just Contact needs this update.
Then, by returning an Institution object, I really return the whole updated object graph (for further changes).
So, my problem is of course: for each object which was updated, I need the new object version.
BTW: my entities have this attribute:
@Version @Column(name = "OBJ_VERSION")
private int version = 0;
Carlo