有人可以解释一下为什么这不起作用吗?我想要一个表格,其中包含有关两个互相玩的用户的信息。这行不通。
Public class History implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@ManyToOne
@Column(nullable = false)
private UserDetails player1;
@ManyToOne
@Column(nullable = false)
private UserDetails player2;
@ManyToOne
@Column(nullable = false)
private UserDetails winner;
@Column(nullable = false)
private Date time;
}
我做错了什么以及如何解决?