Product Information > JADE Error Messages and System Messages > 2 through 1299 - JADE Object Manager Errors > 1223 - Cannot establish inverse

1223   Cannot establish inverse

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.