Could not extract ParameterizedType representation of AttributeConverter definition

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.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章