Mx model reflection association ValueType_MxObjectType empty
Dear Mendix community people, I have a problem when using the app store module Document Generation for Mendix from Appronto in combination with the Mx Model Reflection module. When trying to configure the template configuration, I choose a microflow which returns a list (and should return a table). But when I follow the microflow SF_Table_GetObjectType (which is called on change of the field where I choose a microflow) with the debugger, then the Microflow is found, the ValueType is also found, but the association ValueType_MxObjectType is empty, so no MxObjectType is found. (And yes, I have already synchronized the entities and microflows in de MxModel overview.) This occurs for some Entities from my database, but not for all. When using a microflow that retrieves a list of a new created entity, everything goes well and the MxObjectType is found. But with some entities that were in the database (as MxModelReflection.ValueType) already before, it goes wrong and no MxObjectType is found. Is there anyone who also had this problem and who knows how to solve this? Thank you for your reply! Lizanne
What happens when you remove the module, run the app and then add the module again and sync again?
If all values are then created it might be an issue in the module with updating existing values.
Erwin 't Hoen
I have investigated your issue and I believe the cause of this irregular behavement is corrupt data in the MxModelReflectionModule.
For instance, if you sync Module A with has microflows which return objects (entities) from Module B, but module B is not synced, ValueTypes (coming from the synced microflows) are created in the database which are not associated with MxObjectTypes (which are not available due to not syncing module B).
Unfortunately syncing the Module B afterwards does not result in the existing ValueTypes being updated.
A solution could be to delete the corrupt ValueTypes through an adminpage and syncing the modules again. That way the ValueTypes are created again and have a association with MxObjectType. Be sure to check your existing TemplateConfigurations for correctness after this.
Ps, unselecting all modules and refreshing does not solve the issue. In the MxModelReflection ValueTypes are only deleted when the MxObjectType is deleted. Unfortunately the corrupt ValueTypes still exist because they are not associated.