Ejemplo n.º 1
0
 @Override
 public void removeAssociation(AssociationKey key, AssociationContext associationContext) {
   if (isStoredInEntityStructure(key, associationContext)) {
     EntityDocument owningEntity =
         getDataStore().getEntity(Identifier.createEntityId(key.getEntityKey()));
     if (owningEntity != null) {
       owningEntity.removeAssociation(key.getCollectionRole());
       getDataStore().saveDocument(owningEntity);
     }
   } else {
     removeDocumentIfPresent(Identifier.createAssociationId(key));
   }
 }