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 ?
I don’t know why it worked before, but
“Cannot get unfetched attribute [objDetIdTaxon] from detached object” basically says that you need to adjust your fetch plan, or query the value yourself.
I know it is unfetched and I would like understand, how in Jmix 2.6 this was working !
I have a lot of reports which I have to check and to adapt. Before I now fetch everything piece by piece, I would like to know why it did work before to go to that point and adjust it on that central point.
I think, just with the import org.biooffice.bio4.entity.TLoanItem there is no fetchplan, correct ?
No.
I have some complex Groovy scripts that are related to BPM reporting, and I guess I was lucky because I call the BPM or Flowable api directly to get my result elements mostly.
Yesterday I did spend hours trying to reproduce this problem.
My originalapplication has 116 entities …
I did now extract a testproject with 5 relevant entities, which is working in 2.6 and 2.7. So I will have to search, where is the difference between these 116 entities and the 5 entities.
I did isolate one problem where I would be happy to get an explanation. The excrypt is from the t-loan-item-detail-view.xml from the attached project.
In the entity TLoanItem all fields have the prefix ltm. In the attaced project with 5 entities, these fields have to be mentioned in the fetchplan.
In my application with 116 entities, these fields do not have to be mentioned ( which I understand )
I understand, _base fetch plan includes all attributes of the _local and _instance_name fetch plans, plus embedded references.
How to find out, why in the attached testproject, these properties have to be explicitly mentioned ?
Best regards
Felix
Report26.zip (161.1 KB) In this project the report from TLoan is included and working (which is not the case in the 116 entity project).
The attached project is correct: ltmIdLoan is a reference attribute and must be explicitly included in the fetch plan, because _base fetch plan doesn’t include it.
The question is why in your 116-entities project the Studio suggest the opposite. Are you sure the data model is the same?
I wonder, that with _base … embedded references should be loaded too ? ltmIdLoan is a direct association to Loan where LoanItem is a composition.
How to debug, what is really loaded ?
Both projects have the same datamodel, limited to the contained entities
As you see, there are from TLoan more references to TContact, which I think is not relevant.
A funny observation is, that if in the big project I exclude the objDetIdTaxon as sugggested by the Studio, Studio is complaining, that it should be included in the case of the String taxTaxonCommonName, but for the same case String taxTaxonDisplay, it does not complain ;/
As I said, would be great to be able to debug, why and what is really loaded ( this would be great for optimisation too, as this might be an issue for the speed of the application)
If it helps, I can privatly share with you the 116-entities project.
Actually all details of the entities in question matter, including multiple references to the same entity.
Please either make the test project model identical, or share the real project (e.g. send me a link in a private message).
Set these logger levels to see database operations and fetching configuration: