src/Leevel/Database/Ddd/Relation/BelongsTo.php
protected function getPreLoadEntityValue(array $entitys): array
    {
        $arr = [];

        foreach ($entitys as $value) {
            if (null !== ($tmp = $value->__get($this->sourceKey))) {
                $arr[] = $tmp;
            }
        }

        if (0 === count($arr)) {
            return [0];
        }

        return array_values(array_unique($arr));
    }
protected function getPreLoadEntityValue(array $entitys): array
    {
        $arr = [];

        foreach ($entitys as $value) {
            if (null !== ($tmp = $value->__get($this->sourceKey))) {
                $arr[] = $tmp;
            }
        }

        if (0 === count($arr)) {
            return [0];
        }

        return array_values(array_unique($arr));
    }
分析预载入模型实体中对应的源数据.

@param \Leevel\Database\Ddd\IEntity[] $entitys

@return array