【发布时间】:2012-02-18 11:21:00
【问题描述】:
我想知道是否可以在 jpa 托管实体中具有以下数据结构。
@Entity
public MyEntity {
@ElementCollection
public Map<String, Set<MyEntityTwo>> map;
}
我做了一些基本测试,但出现以下错误:
JPA error
A JPA error occurred (Unable to build EntityManagerFactory): Could not determine type for: java.util.Set, at table: ModelOne_map, for columns: [org.hibernate.mapping.Column(map)]
play.exceptions.JPAException: Unable to build EntityManagerFactory
【问题讨论】:
标签: java hibernate jpa collections