Clarify the seed value of version#649
Conversation
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
| * <p>Any <strong>positive number</strong> or <strong>non-null timestamp</strong> | ||
| * initial value will be the seed of version, otherwise vendors are free to | ||
| * seed the version. |
There was a problem hiding this comment.
I don't see how this actually addresses the real actually-known use case here which is to enable a portable way to choose between an initial version of 0 and an initial version of 1.
With this language:
@Version int version = 1;
lets me portably get an initial value of 1. OK, great.
But:
@Version int version = 0;
Just does something non-portable and vendor-specific.
So there's no portable way to request an initial value of 0.
Is that correct?
There was a problem hiding this comment.
So there's no portable way to request an initial value of 0.
Yes, there is no way to differ int version = 0; from int version;, both of them should be treated as non-predefined, if negative numbers are treated that way, why not zero?
There was a problem hiding this comment.
if negative numbers are treated that way, why not zero?
Well, because counting from 0 is perfectly legit, and often used in computing.
There was a problem hiding this comment.
Indeed, it's what Hibernate does by default, so it can't be terrible.
There was a problem hiding this comment.
if negative numbers are treated that way, why not zero?
Well, because counting from
0is perfectly legit, and often used in computing.
I'm not against that if EclipseLink team would like to support counting from 0.
There was a problem hiding this comment.
Exactly, so it's something that needs to be discussed properly with @lukasj and we need to think through the full impact. i.e. we need an issue to track this. We can't just make this sort of change as a PR with no discussion.
There was a problem hiding this comment.
we need an issue to track this.
Could you reopen #600?
Supersede #600