src/Resources/BaseDbTableResource.php
protected function updatePreRelations(&$record, $relations)
    {
        $record = array_change_key_case($record, CASE_LOWER);
        foreach ($relations as $name => $relationInfo) {
            if (!empty($relatedRecords = array_get($record, $name))) {
                switch ($relationInfo->type) {
                    case RelationSchema::BELONGS_TO:
                        $this->updateBelongsTo($relationInfo, $record, $relatedRecords);
                        unset($record[$name]);
                        break;
                }
            }
        }
    }
protected function updatePreRelations(&$record, $relations)
    {
        $record = array_change_key_case($record, CASE_LOWER);
        foreach ($relations as $name => $relationInfo) {
            if (!empty($relatedRecords = array_get($record, $name))) {
                switch ($relationInfo->type) {
                    case RelationSchema::BELONGS_TO:
                        $this->updateBelongsTo($relationInfo, $record, $relatedRecords);
                        unset($record[$name]);
                        break;
                }
            }
        }
    }
@param array            $record Record containing relationships by name if any
@param RelationSchema[] $relations

@return void
@throws BadRequestException