Hay all,
I have a problem,
Code:
@Transactional(readOnly=false)
public void saveAndProccess(List<Jurnal> listJurnal, Date bgnDate, Date endDate, String user) {
saveListJurnalToReportBook(listJurnal, bgnDate, endDate, user); // save list of jurnal to ReportBook
List<ReportBook> listReportBook = getListReportBookByDateRanges(bgnDate, endDate); // get list of ReportBook
for (ReportBook rb : listReportBook){
System.out.println("sub is === "+rb.getEstimate().getSub());
}
}
the result is : sub is === null
but with this code ( separated calling for 2 methods)
the firts call this method
Code:
@Transactional
public void saveListJurnalToReportBook(List<Jurnal> listJurnal){
// this code to save list of jurnal to ReportBook table
}
the second call this method
Code:
@Transactional(readOnly=false)
public void saveAndProccess(List<Jurnal> listJurnal, Date bgnDate, Date endDate, String user) {
List<ReportBook> listReportBook = getListReportBookByDateRanges(bgnDate, endDate); // get list of ReportBook
for (ReportBook rb : listReportBook){
System.out.println("sub is === "+rb.getEstimate().getSub());
}
}
the result : sub is T
thanks in advance
Pro