konnte nicht initialisiert werden, eine Sammlung

ich habe recs-Modell-Zuordnung zu einem recs-Tabelle in postgresql, werden einige Felder deklariert sein, bei mir lief der code, es warf 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

meine recs Modell:

@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;

    ..

meinem Tisch:

        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[]                   

|

einer Probe recs_detail_name in der db ist wie folgt:

{"TeleNav GPS Navigator","Photobucket for BlackBerry","Cellfire Mobile Coupons"}

weiss jemand, was falsch sein könnte??? Dank

InformationsquelleAutor user468587 | 2012-05-04

Schreibe einen Kommentar