This example shows you the steps you would follow if you are an administrator that wants to create an indirect association between an Employees class, and a Departments class using a membership table.
This example uses an example schema, HR, and an example membership table, Membership. The membership table columns Account_Id and Dept_id contain the association mappings that identify the individual employees and departments that are related, as shown in the following example:
To identify individual employees and departments that are related, create an indirect association between them.
Note: This example assumes that you have already set up a JDBC data source, and created and mapped an account class named Employees.
Follow these steps:
The Mapped Classes dialog appears.
Connector Xpress adds a node named Department to the mapping tree.
The Map Class dialog appears.
Note: These fields are for descriptive purposes only.
The Map Attributes dialog appears.
The Class Associations dialog appears.
Connector Xpress adds a node named with Departments under the Associations node for the Employees class in the mapping tree.
The Indirect Association dialog appears.
This table specifies the association mappings that identify the individual employees and departments that are related.
The result is the following:
Note: Connector Xpress selects the naming class attributes by default in the Employees and Departments Attributes list.
Note: In this example, because the Employees and Department classes do not have a memberOf or member attribute, create a virtual member and memberOf attributes.
The virtual attributes you create describe the association between the Employee class and Department class.
These virtual attributes are a virtual representation of the association between the employee class and department classes naming attributes, and the membership table columns you mapped in step 11. The connector uses these virtual attributes to find the employees in a department, and the departments an employee belongs to.
Connector Xpress automatically does the following:
Connector Xpress creates the indirect association between the Employees and Departments class you have mapped.
Copyright © 2014 CA.
All rights reserved.
|
|