小编Ale*_*huk的帖子

错误:“字段列表”中的未知列“this_.idHardDrives”

请帮助解决错误:“字段列表”中的未知列“this_.idHardDrives”。无法理解数据库中存在字段“idHardDrives”。

硬盘驱动器.java

package main.java.table;


import javax.persistence.*;

@Entity
@Table(name = "hardDrives")
public class HardDrives {

@Id @GeneratedValue
@Column(name = "idHardDrives")
private int idHardDrives;
@Column(name = "name")
private String nameHardDrives;
@Column(name = "capacity")
private int capacity;
@Column(name = "interface")
private String interFace;
@Column(name = "connectionType")
private String connectionType;
@ManyToOne
@JoinColumn (name = "idBrand")
private Brands brands;




public int getIdHardDrives() {
    return idHardDrives;
}

public void setIdHardDrives(int idHardDrives) {
    this.idHardDrives = idHardDrives;
}

public String getNameHardDrives() {
    return nameHardDrives;
}

public void setNameHardDrives(String …
Run Code Online (Sandbox Code Playgroud)

java hibernate hibernate-annotations

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

hibernate ×1

hibernate-annotations ×1

java ×1