We are working on a migration project and we are migrating from HBM files to annotations.
We are facing repeated column mapping issue when I try to set a value on a property, which basically is an instance of the same class.
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;
}
How to map the previousMonthSalary?