6.0 - IdentifierGeneratorFactory #3823
sebersole
started this conversation in
Design Proposals
Replies: 2 comments 10 replies
-
@sebersole Have you considered if there's some reasonable way we could unify at least some of this code with the contracts we had to introduce in Reactive? Basically we have our whole own parallel API here: Now, at least some of that is unavoidable, but I wonder if there's a way that core could accommodate the needs of HR at least a little more elegantly? |
Beta Was this translation helpful? Give feedback.
8 replies
-
I believe all this was done in 6.0, right @sebersole ? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This discussion groups together all of the little discussions we've been having around id-generation the last week or so. The background comes from
Much of the processing done as part of IdentifierGeneratorFactory is still highly slanted to hbm.xml. When annotation support was added, this code was not re-designed properly / at-all. Additional code added to accommodate OGM makes the process to resolve the IdentifierGenerator even more fulgy.
Here is the new series of contracts I am proposing and I'll discuss how it addresses the various parts of the discussion...
IdentifierGeneratorFactory
is still the central contract. Internally it would keep a registry ofGenerationTypeStrategy
delegates byGenerationType
.GenerationTypeStrategyRegistration
services can override a registered strategy.currentRegistrationAccess
allows for access to the previous registration for composition if desired.registrar
is used to register the new strategy.GeneratorDefinitionResolver
allows accessing the generator configuration information, if any, based on name. This would perform a hierarchical, scoped lookup similar to what we do today (local, global).I think another thing we should consider is whether we want to continue with the Properties-based config of generators. Or whether we want to start having a more structured configuration contract. E.g.
Beta Was this translation helpful? Give feedback.
All reactions