模式验证:表中缺少列

时间:2019-04-08 08:02:33

标签: java hibernate jpa-2.0

我正在使用两个持久性单元使用JPA将一个数据库复制到另一个具有一些附加列的数据库。 而我得到这个错误 模式验证:表[copy.activity]中缺少列[ip]

id类:

package model.local;

import java.io.Serializable;

public class LocalActivityId implements Serializable{

    private static final long serialVersionUID = 1L;
    private String ip;
    private long item;

    //GETTER SETTER CONSTRUCTOR

}

主豆:

package model.local;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

@Entity(name = "activity")
@Table(name ="activity", schema="resolvecopy")

@IdClass(LocalActivityId.class)
public class LocalActivityDetails {


    @Id
    private String ip;
    @Id
    private long item;
    private int type;
    private String description;
    //GETTER SETTER CONSTRUCTOR
}

0 个答案:

没有答案