src/Leevel/Database/Ddd/Select.php
protected function loadRelation(array $entitys, string $name, Closure $condition): array
    {
        $relation = $this->getRelation($name);

        $relation->preLoadCondition($entitys);

        call_user_func($condition, $relation);

        return $relation->matchPreLoad($entitys, $relation->getPreLoad(), $name);
    }
protected function loadRelation(array $entitys, string $name, Closure $condition): array
    {
        $relation = $this->getRelation($name);

        $relation->preLoadCondition($entitys);

        call_user_func($condition, $relation);

        return $relation->matchPreLoad($entitys, $relation->getPreLoad(), $name);
    }
关联数据设置到模型实体上.

@param \Leevel\Database\Ddd\IEntity[] $entitys
@param string                         $name
@param \Closure                       $condition

@return array