Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteDeleteInstanceReferences(SdaiServerContext serverContextId, 
                                               InstanceId        instanceId, 
                                               SdaiInvocationId  *edmiInvocationId); 


Deletes all external references to a given instance

...

. Normally an instance cannot be deleted as long as there are other instances referring to it. This default behavior can be overruled by changing the system configuration settings.

...

Arguments

...

TypeNameComment
 SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

 InstanceId

instanceId

A numeric instanceID that uniquely identifies the instance in the remote _remote  EDMdatabase_   for which to delete all external references.

 SdaiInvocationId

edmiInvocationId

Currently not used.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiInteger index, nHits;
 SdaiQueryResult qexRes;
 SdaiInstance personId;
  
 /* Create Server Context */
 rstat = edmiDefineServerContext("MyContext",

...


 "Johnny", "Supervisor", "cf37ftr",

...

 
 "TCP", "9090", "MyServerHost",

...

 
 NULL, NULL, NULL, NULL, NULL, &myContext);

...

 
  
 /* Get a persons instance Id from a unique

...


 primary key attribute 'PID' */

...

 
 nHits = 1;

...


 index = 0;

...


 rstat = edmiRemoteSelectInstances(myContext,

...


 "DataRepository", "SocialRelations",

...

 
 "Person", "PID = '16126353127'",

...

 
 (ONLY_INSTANCE_IDS | SUBTYPES),

...

 
 NULL, NULL, NULL,

...

  
 &index, &nHits, &qexRes,

...

 
 NULL, NULL, NULL, NULL);

...

 
 if (!nHits) {

...


 printf("\nRequested pid not found.");

...

 
 goto err;

...

 
 }
 personId = qexRes->instanceIds[0];

...


  
 /* Delete all references to personId */

...


 rstat = edmiRemoteDeleteInstanceReferences(myContext, personId, NULL);

...


  
 /* Delete the instance it self */

...


 rstat = edmiRemoteDeleteInstance(myContext, personId, 0, NULL);

...


 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"