[hibernate-dev] AttributeConverter - 6.0
steve at hibernate.org
Thu Dec 29 11:20:28 EST 2016
When I first added support for AttributeConverter I incorporated it into
BasicType because that was really the only option at the time.
As we move into 6.0 though I would like to consider moving this to the new
Attribute model. What this means practically speaking is that we'd
move AttributeConverter from the definition of BasicType and instead move
it to select "domain model reference nodes" identified by a
new ConvertibleDomainReference interface. This is already developed
initially in the 6.0 wip where basic singular attributes, basic collection
indexes and basic collection elements are all considered
This work so far only makes the AttributeConverters available
via ConvertibleDomainReference; it does not apply AttributeConverters
via ConvertibleDomainReference. That would be the next step if we decide
to go this route.
Additionally, this would mean that BasicType would no longer contain the
AttributeConverter; BasicType then would be the composition of:
But even MutabilityPlan... I wonder if that should move to the Attribute
model as well?
Anyway, please let me know what y'all think of these open questions asap as
I'd like to start nailing down the Type SPIs for an Alpha.
More information about the hibernate-dev