How to create assosiation in java action on eclipse ?
1
Hi all, I try to create mendix object with statement IMendixObject messageObject = Core.instantiate(context,"mymodule.department"); IMendixObject messageObject = Core.instantiate(context,"mymodule.team"); I have relation as picture below . After I create department and team , how to create assosiation “team_department” in java systax ?
asked
Somboon Srisamanuwat
2 answers
2
This can help you:
In a microflow, set an association between the objects
(Run application)
Go to the javasource folder and open the generated file Microflows.java
answered
Henri Schellingerhout
2
Your Mendix project should have created proxy classes that can handle this for you if you have used Deploy for Eclipse.
Have a look in the javasource / mymodule (or whatever you are using) / proxies folder.
You should be be able to instantiate a new instance of the class and set the association using these proxies. It should be as simple as something like this.
Team team = new Team(context);
team.setTeam_Department(department);