Я получаю ниже ошибку
org.hibernate.AnnotationException: mappedBy ссылается на неизвестное свойство целевого объекта: my.backend.dataObject.PayMaster.PayTransactionStatement в my.backend.dataObject.PayTransactionStatement.payMaster.
Я проверил все сущности, но все еще не могу решить проблему
@Data
@Entity
@Table(name = "pay_master")
@DynamicUpdate //Dynamic update - you need to set the update time field of the database to be automatically updated. In this way, query the time, save the other fields and save the update time.
public class PayMaster {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name="paymaster_id")
private Long paymasterid;
@ManyToOne(fetch= FetchType.LAZY)
@JoinColumn(name="statement_id")
private PayTransactionStatement payTransactionStatement;
}
@Data
@Entity
@Table(name = "pay_transaction_statement")
@DynamicUpdate
public class PayTransactionStatement {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name="statement_id")
private Long statementId;
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy ="PayTransactionStatement")
private List<PayMaster> payMaster;
}