1
我有區域經濟共同體模型映射到PostgreSQL中區域經濟共同體表,有些字段被宣佈爲設定,當我跑的代碼,它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
我的區域經濟共同體模式:
@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"}
任何人都知道什麼可能是錯誤???謝謝