Previous Topic: Direct and Reverse Association ExampleNext Topic: Indirect Association Example


How to Create an Indirect Association

This example shows you the process you use to define an indirect association between two classes, for example, an employee class, and a department class using a membership table. To create the indirect association:

  1. Create a project and specify a JDBC data source for your project.
  2. Create and map class that holds a list of employees.
  3. Create and map a class that holds a list of departments.
  4. Specify that you want to create an indirect association between the employee class and the department class.
  5. Specify the membership table that contains the association mappings that identify the individual employees and departments that are related.
  6. Specify the membership table column that defines the association between employees and departments, and the membership table column that defines the association between departments and employees.
  7. Create a virtual memberof attribute in the employee class and map and it to the membership table column that contains the list of departments the employee is a member of.
  8. Create a virtual members attribute in the department class and map and it to the membership table column that contains the list of employees in each department.
  9. Save the project.

More Information:

How to Define Group Membership

Indirect Associations