Hi! How can I create a microflow with association between two entities connected to an external database, as in the example video (from minute 3) https://www.youtube.com/watch?v=20jvsTS8-cA I have this query in a microflow for a template grid: 'SELECT Gestiones.*, Empresas.Empresa FROM Gestiones LEFT JOIN Empresas ON Gestiones.Solicitante = Empresas.Id_Em;' And I get this error in the console: Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.RuntimeException: The entity type 'MyFirstModule.Gestiones' does not contain the primitive 'Empresa' as specified in the query. at MyFirstModule.Gestiones_Show (JavaAction : 'Execute query') Please someone who can help me. It is urgent and very important.
I guess the problem is, that the DB connector returns a table just as SQL always does. Mendix interpretes this as list of objects (each line is an object, each column is an attribute). You first need to store the result in a single entity that has all the attributes (Make shure attribute names match result table column names). After the db call, you can now start to split that up into multiple entities if needed.
How do I save the result of the microflow in an entity?
I've done the following ... I've created a non-persistent entity, a microflow with the non-persistent entity object, and a query (left join) that returns the result in a list of objects. And I use this microflow in a templateGrid.
This works for me. But I don't know how to load data into entities previously to use them as datasource. I mean, I don't know how to display the query result in an entity instead of a list.