@Column(s) not allowed on a @ManyToOne property:

琢磨半天,多对一的出错了。

 

@ManyToOne()

    @Column(name="depart_id")
    private Department depart;
public int getId() {
return id;

}

应该把@Column(name="depart_id")改成@JoinColumn(name="depart_id")

@JoinColumn(name="depart_id") 

你可能感兴趣的:(错误集绵)