如何在包含可嵌入对象的 TreeMap 中映射列表?
我试图举一个例子,尽管它没有多大意义。但你得到我的问题:
@Embeddable
class BookStore {
Map<BookType, List<Order>> orders = new TreeMap<BookType, List<Order>>();
}
结果:
@OneToMany: targeting an unmapped class List<Order>.
@ElementCollection: HibernateMappingException: could not determine type for: java.util.List