小编Jho*_*lin的帖子

java.lang.NoSuchMethodError:javax.persistence.JoinColumn.foreignKey

请帮我解决这个错误.请关注我的代码:

这是我的班级/实体人:

package entities;

import java.util.Calendar;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class Person {

@Id
@GeneratedValue
private long id;

@Column
private String name;

@Temporal(TemporalType.DATE)
private Calendar dateBirth;

@Column
private String email;

// MappedBy: Name of the instance that will indicate to whom One belongs, that is, an experience.
//           It should say which person is associated
// TargetEntity: Informs the entity we are …
Run Code Online (Sandbox Code Playgroud)

java hibernate jpa maven

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

标签 统计

hibernate ×1

java ×1

jpa ×1

maven ×1