Product Information > JADE Error Messages and System Messages > 1300 through 1399 - Collection Exception Errors > 1352   Dynamic dictionary key property definition has been changed

1352   Dynamic dictionary key property definition has been changed

Cause

This error occurs when the following sequence of actions occurs.

  1. A property that is used as a member key of an instance of DynaDictionary or as a subclass is changed and the database is reorganized.

  2. A persistent instance of the DynaDictionary class or subclass is accessed.

Unlike persistent instances of MemberKeyDictionary subclasses, persistent instances of DynaDictionary subclasses are not reorganized when key properties change.

Action

Call the rebuild method defined on the Collection class for all persistent instances of DynaDictionary subclasses, as shown in the following example.

vars
    subs: ClassColl;
    cls: Class;
    obj: Object;
begin
    create subs transient;
    DynaDictionary.withAllSubclasses(subs);
    beginTransaction;
    foreach cls in subs do
        foreach obj in cls.instances do
            obj.DynaDictionary.rebuild();
        endforeach;
    endforeach;
    commitTransaction;
epilog
    delete subs;
end;