我正在使用两个持久性单元使用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
}