我有以下两个表
表1:服务:
@OneToOne(mappedBy="service")
Routes routes;
表2:路线:
@OneToOne(cascade= CascadeType.ALL)
@JoinColumn(name="service_id")
Service service;
@Column(insertable = false, updatable = false)
Long service_id;
public Long getService_id() {
return this.service_id;
}
public void setService_id() {
this.service_id = service_id;
}
我已将两个实体注释为表格。我已经验证了mappedBy实体正好是表的名称。但我一直收到错误
@OneToOne or @ManyToOne on Service.routes references an unknown entity Routes