src/Resources/DocumentDbTable.php
protected function mergeRecords(array $records)
    {
        foreach ($records as $key => $record) {
            if (null === $id = array_get($record, static::ID_FIELD)) {
                throw new InternalServerErrorException('No ' .
                    static::ID_FIELD .
                    ' field found in supplied record(s). Cannot merge record(s) for PATCH operation.');
            }

            $rs = $this->getConnection()->getDocument($this->transactionTable, $id);
            $record = array_merge($rs, $record);
            $records[$key] = $record;
        }

        return $records;
    }
protected function mergeRecords(array $records)
    {
        foreach ($records as $key => $record) {
            if (null === $id = array_get($record, static::ID_FIELD)) {
                throw new InternalServerErrorException('No ' .
                    static::ID_FIELD .
                    ' field found in supplied record(s). Cannot merge record(s) for PATCH operation.');
            }

            $rs = $this->getConnection()->getDocument($this->transactionTable, $id);
            $record = array_merge($rs, $record);
            $records[$key] = $record;
        }

        return $records;
    }
protected function mergeRecords ( array $ records ) { foreach ( $ records as $ key => $ record ) { if ( null === $ id = array_get ( $ record , static :: ID_FIELD ) ) { throw new InternalServerErrorException ( 'No ' . static :: ID_FIELD . ' field found in supplied record(s). Cannot merge record(s) for PATCH operation.' ) ; } $ rs = $ this -> getConnection ( ) -> getDocument ( $ this -> transactionTable , $ id ) ; $ record = array_merge ( $ rs , $ record ) ; $ records [ $ key ] = $ record ; } return $ records ; }
Merges new record with existing record to perform PATCH operation

@param array $records

@return array
@throws \DreamFactory\Core\Exceptions\InternalServerErrorException
Merges new record with existing record to perform PATCH operation