2 IMendixObject , how to create assoiation ?

1
  Hi ,   I have 2 objects, IMendixObject iMendixObjectChild (department) IMendixObject iMendixObjectParent (team) and I know the name of assosiation for 2 object such as  “mymodule.team_department” How to can I create assosiation for 2 entities ?    Thanks  
asked
2 answers
0

Mendix generates proxy classes that can do this really easily for you.

Look in javasource/<yourmodulename>/proxies

The code could then be as simple as

team.setTeam_Department(department);

If you really don’t want to use the proxy classes, have a look at the code it generates and use that, but it’s really not recommended to do so.

answered
0

try the below:

 

    const team_department = domainmodels.Association.createIn(domainModel);

    team_Customer.name = `team_department`;

    eventType_Customer.parent = eventType ;

    eventType_Customer.child = department;

answered