我们正在开展一个迁移项目,我们正在从 HBM 文件迁移到注释。
当我尝试在属性上设置值时,我们面临重复的列映射问题,该属性基本上是同一类的实例。
public class Salary{
// All the below are coming from lookup table like empLookUp, MonthLookup,
// YearLookup, CurrencyLookUp and they are joined using their primary key
private int empId;
private int month;
private int year;
private String currency;
// Issue here: previousMonthSalary actually needs to be populated when the
// Salary is loaded, but for previous month. How do I achieve this.
private Salary previousMonthSalary;
}
Run Code Online (Sandbox Code Playgroud)
如何绘制地图previousMonthSalary?