No valid associations available

0
I want to put an input association to my Jsonobject but for some reason I can’t. I already connected it in my domain model, so why can’t I associate it in my import mapping? As you can see if it is connected this way, this is what my import mapping shows.   If I set my associations in reverse (arrow points to input), it shows the associations but I clearly do not want that. Any help will be great. Thanks!     Image 1:
asked
1 answers
2

Because your domain model is defined Input *-1 JsonObject. This means:

  • every single JsonObject-object is associated with possibly many Input-objects
  • every single Input-objects is associated with at most one JsonObject-object

Therefor it is not possible for the mapping to determine what Input-object to map the JsonObject-object to.

Let Mendix do the work of creating the importmapping for you:

  • Create a messagedefinition
  • Select entity Input
  • Click 'Generate Mapping(s)’;
  • Select both export and import; now you have two mappings
  • Create a microflow that
    1. Retrieves one Input-object and
    2. Feeds it to the generated EXPORT-mapping

The outcome of the microflow is a JSON-string that you can feed to your importmapping. Probably you will see a difference with the JSON that you currently try to import.

answered