I have two, kind of basic entities (A, B), with both basic attributes, both ManyToOne joined attributes.
When I want to join them in a browser, I use ValueCollectionDatasource. I tried multiple JPQL queries, which all basiclly join the 2 entities on an associated entity (they both have attribute X, which is an association).
The join happens beautifully, however when I want to reach for an associated attribute (Y) in A, I get the unfetched attribute error and I can’t for the life of me figure out how to solve it.
I tried creating a non-persistant entity © with association to A, B. I then tried using a collection datasource for class C and 2 nested datasources for A, B. This seemed like a good solution, since I can set the view for A, B, in order to gain access to the attributes I couldn’t reach before. I wrote a JPQL script, which takes the 2 nested datasources and selects the values where attribute X is equal on both.
However, in this case I got the error: “Datasource couldn’t depend from two different sources”, which I don’t understand, since depending on only one datasource makes the outer datasource kindof pointless imo.
Can somebody provide me a solution on this topic?
Thanks in advance
P.S.: attribute Y is coming from a superclass, with JOINED inheritance. Idk if it changes anything in this case.