sdaiUpdateInverse
Enables or disables the _EDMinterface_ automatic update of Inverse attributes in the EDMinterface. When the _EDMinterface_ automatic update of Inverse attributes is enabled, all write (put) operations that set or reset a relation between two instances and there exists an Inverse constraint for this relation, then the related Inverse attributes will be updated accordingly in the same operation.
The _EDMinterface_ automatic update of Inverse attributes state is set individual for each data model when the actual data model is created and cannot later be changed for existing models.
It is recommended that the _EDMinterface_ automatic update of Inverse attributes is enabled to ensure correctness in the updating of INVERSE relations. The _EDMinterface_ automatic update of Inverse attributes can cause a minor performance penalty.
The status of the _EDMinterface_ automatic update of Inverse attributes before the operation will be returned by this operation.
Related functions: edmiCreateModel , edmiCreateModelBN
Header:
#include "sdai.h"
Prototype:
SdaiOnOff sdaiUpdateInverse(SdaiOnOff OnOff);
Arguments:
OnOff |
sdaiON : Enable _EDMinterface_ automatic update of Inverse attributes. |
Returns:
A SdaiOnOff value that has the following value:
sdaiON : The _EDMinterface_ automatic update of Inverse attributes was enabled before operation.
sdaiOFF: The _EDMinterface_ automatic update of Inverse attributes was disabled before operation.
Examples:
SdaiOnOff inverseState;
SdaiErrorCode errCode;
SdaiRepository repository;
SdaiSchema schema;
SdaiModel modelId;
...
inverseState = sdaiUpdateInverse(sdaiOFF);
/* Inverse update off for new models */
modelId = sdaiCreateModel(repository, "Building_AXD67H", schema);
if (! modelId) {
/* Error in operation */
printf("\nError: %s in sdaiCreateModel \n",
edmiGetErrorText(sdaiErrorQuery()));
goto error;
}
. . .
/* Reset to original update inverse state */
sdaiUpdateInverse(inverseState);
. . .