2
我们可以在集合中的集合的字段上有一个ElementCollection注释吗?JPA休眠和ElementCollection地图
@ElementCollection
private Map<String, List<String>> mappedData = new HashMap<String, List<String>>();
我这个所以不知道让MappingException此刻如果涉及额外的注解或代码,或者如果我必须做出一个新的类,也许使用嵌入式和嵌入式
小心嵌套集合。如果您以后需要将List更改为Set,会发生什么情况?请参阅@AlexR对使用bean的有用建议:http://stackoverflow.com/questions/16516107/how-can-i-store-hashmapstring-arrayliststring-inside-a-list – bphilipnyc