1
내가 PostgreSQL을에 RECS 테이블에 RECS 모델 매핑, 일부 필드는이 같은 errorr 던졌다, 내가 코드를 실행할 때, 설정하는 선언이 있습니다이 컬렉션을 초기화 할 수 없습니다
org.hibernate.exception.SQLGrammarException: could not initialize a collection: Recs._recsDetailName
caused by: org.postgresql.util.PSQLException: ERROR: relation "recs__recsdetailname" does not exist
내 RECS 모델 :
@Entity
@Table(name = "RECS", uniqueConstraints = @UniqueConstraint(columnNames = "id"))
public class Recs implements Serializable, Cloneable {
/**
* Serialized version unique identifier.
*/
private static final long serialVersionUID = -7316874431882307750L;
@Id
@Column(name = "id")
private int _id;
@Basic
@Column(name = "recs_num")
private int _recsNum;
@Basic
@Column(name = "details")
private String _details;
@Column(name = "d_stamp")
private Date _timeStamp;
@ElementCollection(fetch = FetchType.EAGER)
@Column(name = "recs_detail_name")
private Set<String> _recsDetailName;
..
내 테이블 :
Column | Type | Modifiers
-----------------------+-----------------------------+-------------------------------
id | integer | not null default
recs | xml |
recs_num | integer |
details | character varying(300) |
d_stamp | timestamp without time zone | default now()
recs_detail_name | text[]
|
DB를에서 샘플 recs_detail_name은 다음과 같이이다 :
{"TeleNav GPS Navigator","Photobucket for BlackBerry","Cellfire Mobile Coupons"}
사람이 무슨 일을 수 있습니다 알고 ??? 감사합니다