Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82402

LInking multiple entities into 1 data grid

$
0
0

Given this group of entities: Project - Project team - Project team member

A project has 1 or more project teams which has 1 or more team members. Team members can be linked to the entity Employee, which is in fact a foreign key in this case.

In a relational DB a child inherits the key of it parents, thus: Project (P-ID) - Project team (P-ID/PT-ID) - Project team member (P-ID/PT-ID/PM-ID) (with PM-ID as the foreign key to Employee (M-ID).

With the requirement to show all projects an employee has worked on, you can link from Employee to Project team member, and from there to Project and Project team, as Project team member has the unique (inherited) keys to those entities.

Showing data in a data grid with attributes from the 3 Project entities based on the selected employee does not work in Mendix.

You could base the data grid on Project team member (data source) to have a direct link to the selected employee, and you can also get data from the Project team entity, but not from the main Project entity. In a grid you can add attributes from the same entity the grid is based on and the next entities linked to that entity by association. And between Project and Project team member there is no direct association.

How can we get a data grid with the required data from the 3 entities based on a value from a fourth (Employee)?

Or can this be achieved using OQL, even though OGL is not a data source to a widget such as data grids?


Viewing all articles
Browse latest Browse all 82402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>