Dear experts, I am currently working on a SAP interface where I need to create an entity with associated objects in SAP. When I import the module using the SAP odata model creator the association names in the domain model are automatically getting the abbreviation HEADERTOITEM_ so the full name of the association becomes HEADERTOITEM_Header_Item. It does that for all associated entities. Now when I am creating the header object and associate the item objects to it and send that to SAP using a CREATE activity, SAP seems to be ok with my request and a 201 response is returned. However, in the return the payload is using those same associations in the return which apparantly can not be handled by Mendix. The error in Mendix is as follows: The given value '[MendixIdentifier:: id=43347146413442425 objectType=ZINTERFACE_NAME.Header entityID=154]' with type 'class com.mendix.basis.objectmanagement.MendixIdentifier' is not of the same type as the member corresponding with the given member name 'ZINTERFACE_NAME.HEADERTOITEM_Header_Item It looks like it doesn’t recognize the association between header and item and could not match the header entity type. So when I remove that abbreviation Mendix seems to recognize the association. I know that because I am removing the abbreviations 1 by 1, and every time I got to the next error where it encountered the next association for casting the next entity. But then when I have removed all of the abbreviations for all entities, then SAP doesn’t seem to recognize anymore that I am sending a request for creating a deep entity (but ‘just’ a create entity). As if SAP on its turn now doesn’t recognize the newly named associations. A perfect deadlock if you ask me. Anyone else had a similar problem and knows how to bypass this? Using Mendix version 9.10.1 (not available in the list at the time of writing this question)
What we had to do to make it work is to manually change the association names for all entities with a reference set by adding 'Set' to the middlename (to SapName_HeaderSet_Item) .
If you are experiencing similar issues and want to have this fixed automatically, please upvote the idea below: