src/Leevel/Database/Ddd/Select.php
public function preLoadResult($result)
    {
        list($result, $type) = $this->conversionToEntitys($result);

        if ($type) {
            $result = $this->preLoadRelation($result);

            if ('entity' === $type) {
                $result = reset($result);
            } elseif ('collection' === $type) {
                $result = new Collection($result);
            }
        }

        return $result;
    }
public function preLoadResult($result)
    {
        list($result, $type) = $this->conversionToEntitys($result);

        if ($type) {
            $result = $this->preLoadRelation($result);

            if ('entity' === $type) {
                $result = reset($result);
            } elseif ('collection' === $type) {
                $result = new Collection($result);
            }
        }

        return $result;
    }
尝试解析结果预载.

@param mixed $result

@return mixed