저는 JPA의 초보자이며 이에 대한 좋은 Google 솔루션을 찾을 수 없었습니다. 문자열의 LinkedHashMap에 JPA 어노테이션을 설정하려고합니다. 여기에 비틀기가 있는데, 나는 mappedSuperClass로 매핑하고있는 추상 클래스를 가지고있다. 따라서이 수퍼 클래스의 모든 구현에는 문자열의 LinkedHashMap이 있습니다. 내 예가 여기에 있습니다.JPA LinkedHashMap annotations
@MappedSuperclass
public abstract class AbstractCustomerType implements Serializable
{
@ElementCollection //is this right?
protected LinkedHashMap<String, String> customerData;
}
데이터베이스에 어떤 내용이 있습니까? customerData의 자체 조인 테이블을 갖는 AbstractCustomerType의 각 구현은 무엇입니까? 이 경우 10 개의 CustomerTypes가 있으면 10 개의 customerData 테이블을 갖게됩니까? 모든 customerTypes에서 공유되는 customerData 테이블을 하나만 가져올 수 있도록이 주석을 어떻게 작성합니까?