I was trying to store some JSON as a string in a column via JPA and Spring and was following a baeldung tutorial. My code like this:
@Column
@Convert(converter = MyEntityExtentionConverter.class)
private Map<String, Object> myEntityExtention;
MyEntityExtentionConverter is an implementation of javax.persistence.AttributeConverter<Map<String, Object>, String> that converts the string back and forth using the Jackson ObjectMapper.
According to mentioned tutorial this should have been it, however now I get an Error that
'Basic' attribute type should not be a map
Theoretically I could disable it by adding @SuppressWarnings("JpaAttributeTypeInspection") to the annotations, but that feels like ignoring rather than solving the error. What am I doing wrong here?