protected function populateRelationAsyncSingle($name, &$primaryModels) {
        return $this->one()->otherwise(function() { return null; })->then(
            function($model) use ($name, &$primaryModels) {
                $primaryModel = reset($primaryModels);
                if ($primaryModel instanceof ActiveRecordInterface) {
                    $primaryModel->populateRelation($name, $model);
                } else {
                    $primaryModels[key($primaryModels)][$name] = $model;
                }
                if ($this->inverseOf !== null) {
                    $this->populateInverseRelation($primaryModels, [$model], $name, $this->inverseOf);
                }

                return [$model];
            }
        );
    }