datanucleus-core icon indicating copy to clipboard operation
datanucleus-core copied to clipboard

Allow type converters to be defined at class-level to allow override of superclass field converters

Open andyjefferson opened this issue 2 years ago • 1 comments

With a JPA @Convert we can then do

public class BaseClass
{
    @Convert(converter=MyConv1.class)
    MyType myField;
}
@Convert(attributeName="myField", converter=MyConv2.class)
public class SubClass
{
    ...
}

This will mean that when checking if a field has a converter we need to go via the ClassMetaData, which will find out for the member, firstly checking for class-level overrides, then member specifications.

andyjefferson avatar Jan 22 '23 13:01 andyjefferson