OQL Query: JOIN Tables without Association in Mendix 10.21

0
Hi Mendix Community! I'm working with Mendix Studio Pro 10.21 and facing a challenge with querying data from two tables that don't have a direct association in the domain model. Both tables contain a unique ID column that I'd like to use for joining the data. Current Situation: Using Mendix Studio Pro 10.21 Two entities without association in domain model Both entities have matching ID columns Need to combine data from both tables What I'm trying to achieve: I need to retrieve combined data from both tables using these ID columns as a joining key. Possible Solutions I'm considering: Using OQL Query Creating an Entity View Has anyone encountered a similar situation? I'd appreciate any suggestions on how to: Write an OQL query to join these tables Or create an effective Entity View for this purpose Looking forward to your expertise and recommendations! Best regards, Ingo
asked
3 answers
1

Hello Ingo,

we can use below OQL joining table with common attribute,please check if this will help.

If OQL will not help then you can try with helper entity creation and populate your data as per your requirements.

image.png

answered
0

You can join in the where clause, or you can join in the on clause of the join expression, see example. You can now also cast the ID to a long, for comparison and joins.

 

image.png

answered
0

Hi Rajum, hi Andrej,

thanks for your input/support. I will try both ideas.

Regards

Ingo

answered