Join three entity through Mendix Object Query Language (OQL)

0
Hi all, I have  a three entities connected by association as below:   For each Atr object (say5) one atr instance will be created (Total 5) and all the atr Instance will be stored in Cls Instance. Now I trying a OQL query to join all the three entities. I can join Cls Instance and atr instance through below query: SELECT * FROM OQL.ClsInstance INNER JOIN OQL.ClsInstance/OQL.AtrInstance_ClsInstance/OQL.AtrInstance But I need help to join all the three entities. I tried with following query: SELECT * FROM OQL.ClsInstance INNER JOIN OQL.ClsInstance/OQL.AtrInstance_ClsInstance/OQL.AtrInstance LEFT JOIN OQL.AtrInstance/AtrInstance_Atr/OQL.Atr Mendix is throwing error like “There isn't a meta association with name 'AtrInstance_Atr' of meta object 'OQL.AtrInstance' Please help me to figure out this issue. Mendix version: 8.10.2
asked
1 answers
0

The first join needs to have an existing value always. So start in AtrInstance and make it two left joins. Try this:

SELECT * FROM OQL.AtrInstance
LEFT JOIN OQL.AtrInstance/OQL.AtrInstance_ClsInstance/OQL.ClsInstance
LEFT JOIN OQL.AtrInstance/AtrInstance_Atr/OQL.Atr 

 

answered