This content has been marked as final.
Show 2 replies
-
1. Re: Need advice on refreshing @Version column
oglueck Aug 21, 2006 5:35 PM (in response to treespace)Because your original is probably detached.
-
2. Re: Need advice on refreshing @Version column
treespace Aug 22, 2006 12:07 AM (in response to treespace)Sure, it's detached but it's passed to a session bean that calls merge then refresh. Refresh does not return an up-to-date instance as merge does; it simply sync's the database record with the instance you passed as an argument.
Insofar as the only difference between the original and the merged entity is the version string (notwithstanding triggers that might change state) I assume my solution is correct: just transfer the new version number from the merge return entity to the original. It just feels icky.