| I just added a note to the PR related to this fix and I'll amend this JIRA with the same: I'm not convinced that the code added for this is necessarily spec compliant. In JPA 2.1 section 3.8:
The attribute conversion facility allows the developer to specify methods to convert between the entity attribute representation and the database representation for attributes of basic types.
So when you have an entity which has a collection of basic types such as:
@Convert(converter = StringToListConverter.class)
private List<String> values;
The attribute persistent type here is a `List<String>` regardless of the fact that it is stored in the database a single `String` column data type. Also from the spec in section 6.2.1.1:
For every persistent collection-valued attribute z declared by class X, where the element type of z is Z, the metamodel class must contain a declaration as follows:
if the collection type of z is java.util.List, then public static volatile ListAttribute<X, Z> z;
So I don't agree that this should be represented as a SingularAttribute as this PR does. I'm inclined to revert this fix in order to address HHH-12581 In Progress . |