We're updating the issue view to help you get more done. 

addRelationship ignores soft delete

Description

minimum case:
Create an object to reference
Delete the object
Recreate the exact same object
Create an object that will reference the first
use "get" to find the object to reference (the function is supplied below)
use addReference to add a reference from the second object to the first

function getAccessionRecordID($ps_accessionrecord) {
print "looking form accession record {$ps_accessionrecord}\n";
$t_ar = new ca_objects();
$t_label = $t_ar->getLabelTableInstance();
if (!$t_label->load(array('name' => $ps_accessionrecord)))
{
print "ERROR - {$ps_accessionrecord} was not found\n";
}
else
{
$vn_accessionrecord_id = $t_label->get('object_id');
}
print "\t\t Found Accession Record {$ps_accessionrecord}\n";
return $vn_accessionrecord_id;
}

This results in the second object being related to a soft deleted first object

Environment

Apache under Windows 7, Providence 1.5 from github (developer) PHP version 5.5.15.

Assignee

User known

Reporter

Gordon Barker

Labels

None

Affects versions

Priority

Minor
Configure