src/Leevel/Database/Ddd/Relation/ManyMany.php
public function preLoadCondition(array $entitys): void
    {
        $this->select
            ->join($this->middleEntity->table(), [
                'middle_'.$this->middleTargetKey => $this->middleTargetKey,
                'middle_'.$this->middleSourceKey => $this->middleSourceKey, ], [
                    $this->middleTargetKey       => '{['.$this->targetEntity->table().'.'.$this->targetKey.']}',
                ])
            ->whereIn(
                $this->middleEntity->table().'.'.$this->middleSourceKey,
                $this->getPreLoadSourceValue($entitys)
            )
            ->asDefault()
            ->asCollection(false);
    }
public function preLoadCondition(array $entitys): void
    {
        $this->select
            ->join($this->middleEntity->table(), [
                'middle_'.$this->middleTargetKey => $this->middleTargetKey,
                'middle_'.$this->middleSourceKey => $this->middleSourceKey, ], [
                    $this->middleTargetKey       => '{['.$this->targetEntity->table().'.'.$this->targetKey.']}',
                ])
            ->whereIn(
                $this->middleEntity->table().'.'.$this->middleSourceKey,
                $this->getPreLoadSourceValue($entitys)
            )
            ->asDefault()
            ->asCollection(false);
    }
设置预载入关联查询条件.

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