src/snac/server/neo4j/Neo4JUtil.php
/**
     * Merge Resource
     *
     * Removes all RRELATIONS from a victim and copies them to the target resource node
     *
     * @param \snac\data\Resource $resource The victim object to be discarded
     * @param \snac\data\Resource $target The target resource object
     * @return true
     */
Merge Resource
Removes all RRELATIONS from a victim and copies them to the target resource node


Merge Resource Removes all RRELATIONS from a victim and copies them to the target resource node
public function mergeResource($victim, $target) {
            $result = $this->connector->run("MATCH (victim:Resource {id: {victimResourceID}})<-[rel1:RRELATION]-(victims_ic:Identity)
                                             MATCH (target:Resource {id: {targetResourceID}})
                                             MERGE (target)<-[rel2:RRELATION]-(victims_ic)
                                             SET rel2 = rel1
                                             DETACH DELETE (victim);",
                [
                    "victimResourceID" => "{$victim->getID()}",
                    "targetResourceID" => "{$target->getID()}"
                ]
            );
            return true;
    }
public function mergeResource ( $ victim , $ target ) { $ result = $ this -> connector -> run ( " MATCH (victim:Resource {id: {victimResourceID}})<-[rel1:RRELATION]-(victims_ic:Identity)
                                             MATCH (target:Resource {id: {targetResourceID}})
                                             MERGE (target)<-[rel2:RRELATION]-(victims_ic)
                                             SET rel2 = rel1
                                             DETACH DELETE (victim); " , [ " victimResourceID " => " { $ victim -> getID ( ) } " , " targetResourceID " => " { $ target -> getID ( ) } " ] ) ; return true ; }
Merge Resource
 Removes all RRELATIONS from a victim and copies them to the target resource node
Merge Resource Removes all RRELATIONS from a victim and copies them to the target resource node
// find all related Identities on the target resource