bug :
https://hibernate.atlassian.net/browse/HHH-8854
解決辦法:
升級hibernate - >
<hibernate.version>4.3.11.Final</hibernate.version>
調用形式:
You are right, unfortunately, AttributeConverter doesn't work with parametric types(generics) so the easiest way is to use:
@Converter(autoApply=true)
public class JsonKeyValueConverter implements
AttributeConverter<HashMap, String> {
it allows you to use HashMap<String, String>
directly inside your overridden methods.