우리는 마이그레이션 프로젝트를 진행하고 있으며 HBM 파일에서 주석으로 마이그레이션 중입니다.@ManyToOne 연관을 SQL 쿼리 결과에 매핑하는 방법
기본적으로 동일한 클래스의 인스턴스 인 속성에 값을 설정하려고하면 반복되는 열 매핑 문제가 발생합니다.
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;
}
previousMonthSalary
을 매핑하는 방법은 무엇입니까?
주석을 사용하고 ('Public'과 같은 유효하지 않은 항목없이) 실제 코드를 게시하고 예외의 전체 스택 추적을 게시하십시오. –
문제가 무엇인지 설명하거나 보여주십시오. 예외 또는 잘못된 결과, .. –