Hi Deepak,
thanks for your reply.
The problem is this:
I'm trying to do an update ONLY on a subset of fields, but what I get is that, although using dynamic-update and select-for-update techniques, if ANOTHER field has changed and has a more recent value than the one in my detached entity, I override its value.
Let me try to explain it better
entity with fields a,b,c,d,e
- I read the entity and detach it
- Another process modifies and commit field "e"
- On my detached entity, I change field a,b, reattach the entity and the dynamic update creates an update on a,b,e
Note that MY field "e" is OLD, so I loose the changement the external process has done.
In standard SQL I'd have been
UPDATE entity, set a='XX', b='YY'
what's your opinion about?
|