2012-02-18 2 views
1

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 

답변

2

link 찾을 수는 표준 JPA 가능 아니라고하고 선호하는 방법은 랩퍼를 작성하는 것입니다 상태 목적.

관련 문제