Product Information > JADE Error Messages and System Messages > 2 through 1299 - JADE Object Manager Errors > 1210 - Duplicated relationship reference

1210   Duplicated relationship reference

Cause

This error occurs if JADE encounters a duplicate relationship reference. An example of this error follows. Consider the following sequence.

  1. There are two classes: Department and Employee.

  2. Each Department has a collection, allEmployees, of all of its employees.

  3. Each Employee has a reference, dept, to their department.

  4. An inverse reference is defined between dept and allEmployees, so that one department has many employees and a single employee has only one department. Both properties are defined to have an update mode of manual/automatic.

  5. An instance of Employee, e, is created.

  6. Two instances of Department, d1 and d2, are created.

  7. e.dept is set to d1 to automatically add e to d1.allEmployees.

  8. e is then manually added to d2 with d2.allEmployees.add(e), at which point JADE attempts to automatically update e.dept.

This causes a duplicated relationship reference error, as in attempting to update e.dept to d2, JADE will find that e is already referenced by d1. Because e.dept is a single-value property (that is, it is not a collection), e can be referenced only by one department at a time.

Action

Change your application code to avoid a duplicated relationship reference.

In relation to the above example, you should consider the following coding changes.