|
Implementations of AttributeConverter<X<Z>, Y> fail in Hibernate 4.3.0.Final (with hibernate-jpa-2.1-api 1.0.0.Final).
The following declaration fails:
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
@Converter
public class CategoryConverter implements AttributeConverter<Set<Category>, String>
But this one works:
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
@Converter
public class CategoryConverter implements AttributeConverter<Set, String>
The exception is
And it occurs occurs in AttributeConverterDefinition.java:67:
entityAttributeType = (Class) attributeConverterSignature.getActualTypeArguments()[0];
where the real type is ParameterizedTypeImpl, probably because Set<Category> is more complex than just Set.
|