Hi Everybody
Until Jmix 2.7.x the following groovy script did work
import org.biooffice.bio4.entity.TLoanItem
def result = [];
def posList = dataManager.load(TLoanItem)
.query("e.ltmIdLoan = ?1", params['Loan'])
.list();
posList.each(
pos->{
result.add([
'objStorageNumber' : pos.ltmIdObject.objStorageNumber,
'taxTaxonDisplay' : pos.ltmIdObject.objDetIdTaxon.taxTaxonDisplay,
'taxTaxonCommonName' : pos.ltmIdObject.objDetIdTaxon.taxTaxonCommonName,
'objStorageLevel4' : pos.ltmIdObject.objStorageLevel4,
'ltmDateInPlanned' : pos.ltmDateInPlanned
])
}
);
return result;
Since version 2.7.x I get an error
ReportingException: An error occurred while loading data for band [Data] and query [dataSet1]. Report name [Leihschein]
An error occurred while loading data for data set [dataSet1]
Cannot get unfetched attribute [objDetIdTaxon] from detached object org.biooffice.bio4.entity.TObject-26160 [detached].
There are now several solutions to resolve this.
Why did it work before 2.7.x ?
What is the best way to handle this case after 2.7.x ?
Thank you
Best regards
Felix
