src/Data/Tools/BizDataObj_Assoc.php
public static function addRecord($dataObj, $recArr, &$isParentObjUpdated)
    {
        if ($dataObj->association["Relationship"] == "M-M") {
            $isParentObjUpdated = false;
            return self::_addRecordMtoM($dataObj, $recArr);
        } elseif ($dataObj->association["Relationship"] == "Self-Self") {
            $isParentObjUpdated = false;
            return self::_addRecordSelftoSelf($dataObj, $recArr);
        } elseif ($dataObj->association["Relationship"] == "M-1" || $dataObj->association["Relationship"] == "1-1") {
            $isParentObjUpdated = true;
            return self::_addRecordMto1($dataObj, $recArr);
        } elseif ($dataObj->association["Relationship"] == "1-M") {
            $isParentObjUpdated = false;
            return self::_addRecord1toM($dataObj, $recArr);
        } else {
            throw new Openbizx\Data\Exception("You cannot add a record in dataobj who doesn't have M-M or M-1 or Self-Self relationship with its parent object");
            return false;
        }
    }
public static function addRecord($dataObj, $recArr, &$isParentObjUpdated)
    {
        if ($dataObj->association["Relationship"] == "M-M") {
            $isParentObjUpdated = false;
            return self::_addRecordMtoM($dataObj, $recArr);
        } elseif ($dataObj->association["Relationship"] == "Self-Self") {
            $isParentObjUpdated = false;
            return self::_addRecordSelftoSelf($dataObj, $recArr);
        } elseif ($dataObj->association["Relationship"] == "M-1" || $dataObj->association["Relationship"] == "1-1") {
            $isParentObjUpdated = true;
            return self::_addRecordMto1($dataObj, $recArr);
        } elseif ($dataObj->association["Relationship"] == "1-M") {
            $isParentObjUpdated = false;
            return self::_addRecord1toM($dataObj, $recArr);
        } else {
            throw new Openbizx\Data\Exception("You cannot add a record in dataobj who doesn't have M-M or M-1 or Self-Self relationship with its parent object");
            return false;
        }
    }
Add a new record to current record set

@param BizDataObj $dataObj - the instance of BizDataObj
@param array $recArr - the record array to be added in the data object
@param boolean &$isParentObjUpdated - flag that indicates if the parent form needs to be updated
@return boolean