unifying generators (id, version, value generation) #5349
Replies: 5 comments 34 replies
-
Using the annotation |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
So after today's work, this should now be straightforward. We can make the move anytime we like, since all the machinery is there. |
Beta Was this translation helpful? Give feedback.
-
So now I've arrived at an interesting question. I've reached the point where an "id generator" is just an So then what precisely is the difference between an But, since we already have both these annotations, and because I'm disinclined to deprecate the one we only just added in 6.0, probably this was a mistake. If you want to use an Thoughts? |
Beta Was this translation helpful? Give feedback.
-
So I'm now primarily worried about package organization. Related issue is this one: https://hibernate.atlassian.net/browse/HHH-15800 Basically, I want to move
WDYT? |
Beta Was this translation helpful? Give feedback.
-
Perhaps I'm wrong, or perhaps it's simply not worth the effort, but I feel like
VersionJavaType
is a bit of a hangover from ancient days, and that there should be some way to unify version generation with the wholeValueGeneration
infrastructure.In particular, the ugly
@Source
annotation, and theDbTimestampType
(which is deprecated, but still underlies@Source(DB)
) stick out like sore thumbs.@beikov wrote in
DbTimestampType
that we should:but as far as I can tell it's not actually possible at present to use
ValueGeneration
to implement@Source
.Nor can I see any way to achieve the effect of
@Source
using@Generated
or@GeneratedColumn
.Am I missing something there? I would love to deprecate
@Source
or reimplement it as a@ValueGenerationType
.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions