Closed gavinking closed 1 year ago
Something else I ran into: in the javadoc it's lightly-implied that @Convert
with no converter
and no disableConversion
may be used to apply a non-auto-apply converter, which looks useful and totally makes sense.
But then this is contradicted (clarified?) in the spec which says that in fact the behavior in this case is undefined.
I would formalize what is implied by the Javadoc. Annotating a field @Convert
should look for a suitable converter and apply it. There's no need to explicitly specify the converter class unless there is an ambiguity.
I've found another hole here. The spec mentions three cases for use of @Convert
:
and it says:
What about:
@Convert
be used with non-map collections of embeddables?
AFAICT, nowhere does the spec say how to determine the target type of an
AttributeConverter
.UPDATE: in fact, the spec as written is not even clear at all as to what is a legal "target" type, and what is a legal converted type.