I am curious on this topic as well. I am currently in the process of converting XML mappings to annotations and have not found an equivalent annotation for the "unsaved-value" attribute of the "version" element. I have run all of my tests and they seem to pass without any annotation specifying an unsaved-value. I have also run a few tests on the behavior of the "version" field when using annotations and it appears to be identical to the behavior when using XML mappings.
Since there is no specified unsaved value via annotations, what can I expect the value of my version field to be when instantiating a new entity and after it is saved and/or persisted? Also, can I expect the annotation mappings to behave exactly like the XML mappings in this case?
|