Cause
This error occurs if your application code attempts to assign one end of a relationship and JADE is unable to assign the inverse (the other end of the relationship).
The error does not occur if you check the Inverse Not Required check box on the Define Reference dialog.
The following example assumes that the Inverse Not Required check box has not been checked.
Consider the following code.
vars chq : ChequeAccount; sav : SavingsAccount; cust : Customer; begin chq := ChequeAccount.firstInstance; sav := SavingsAccount.firstInstance; cust := Customer.firstInstance; chq.myCustomer := cust; // This assignment succeeds sav.myCustomer := cust; // This assignment fails end;
The assignment chq.myCustomer := cust; is valid. When cust is assigned to chq.myCustomer, JADE can add chq to the dictionary of cheque accounts on cust because chq is compatible with the membership of the dictionary.
The assignment sav.myCustomer := cust; results in a 1223 - Cannot establish inverse error. When cust is assigned to sav.myCustomer, JADE cannot add sav to the dictionary of cheque accounts on cust because sav is not compatible with the membership of the dictionary. Consequently no inverse can be established.
When one end of a relationship is established, JADE must be able to assign at least one inverse to the originating object, or this error occurs. JADE cannot accept the assignment of cust to sav.myCustomer because it would result in a relationship with only one end of the relationship established.
Action
Change your application code in one of the following ways.
Remove the assignment for which JADE is unable to create an inverse.
Define an inverse so that the other side of the relationship can be established.
Check the Inverse Not Required check box on the Define Reference dialog, which allows a reference to be set even if its inverse reference cannot be established.
Note that a reference that has no inverse (for example, sav.myCustomer) would have to be manually set to null if the myCustomer object were deleted.