// "!isSourceIndependentFromTargetChange"
DbRelationship dbRelationship = (DbRelationship) relationship
.getDbRelationships()
.get(0);
ObjectId targetId = sourceRow.createTargetObjectId(relationship
.getTargetEntityName(), dbRelationship);
// null id means that FK is null...
if (targetId == null) {
this.response = new GenericResponse(Collections.EMPTY_LIST);
return DONE;
}
DataRow targetRow = cache.getCachedSnapshot(targetId);
DataRow resultRow;
if (targetRow != null) {
resultRow = targetRow;
}
// if no inheritance involved, we can return a valid partial row made from
// the target Id alone...
else if (domain.getEntityResolver().lookupInheritanceTree(
(ObjEntity) relationship.getTargetEntity()) == null) {
resultRow = new DataRow(targetId.getIdSnapshot());
}
else {
// can't guess the right target...
return !DONE;
}