-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard way to control initial value of @Version #600
Comments
The most obvious way to do this is to let you write: @Version
int version = 1; and I have a feeling Hibernate already lets you do that. |
Both of Hibernate and EclipseLink works fine, perhaps we should repurpose the issue to make this feature official, any non-negative integer initial value will be the seed of version, negative or null initial value is considered as undefined and vendor is free to handle it. |
That sounds good to me.
Yes. |
EclipseLink treats |
Superseded by #649. |
@gavinking timestamp version applies here too, think about @Version
LocalDateTime version = LocalDateTime.of(...); Which one should be the initial value, |
Yes, sure, I know. |
Test rely on version value assertion is failed when switch from Hibernate to EclipseLink, because Hibernate starts from
0
but EclipseLink starts from1
, It would be nice if the spec enforce it.I'd like it starts from
1
because it's human readable then can be display in UI directly.The text was updated successfully, but these errors were encountered: