src/Leevel/Database/Ddd/Relation/ManyMany.php
public function addRelationCondition(): void
    {
        if (static::$relationCondition) {
            $this->select
                ->join($this->middleEntity->table(), [
                    'middle_'.$this->middleTargetKey => $this->middleTargetKey,
                    'middle_'.$this->middleSourceKey => $this->middleSourceKey, ], [
                        $this->middleTargetKey       => '{['.$this->targetEntity->table().'.'.$this->targetKey.']}',
                    ])
                ->where(
                    $this->middleEntity->table().'.'.$this->middleSourceKey,
                    $this->getSourceValue()
                )
                ->asDefault()
                ->asCollection(false);
        }
    }
public function addRelationCondition(): void
    {
        if (static::$relationCondition) {
            $this->select
                ->join($this->middleEntity->table(), [
                    'middle_'.$this->middleTargetKey => $this->middleTargetKey,
                    'middle_'.$this->middleSourceKey => $this->middleSourceKey, ], [
                        $this->middleTargetKey       => '{['.$this->targetEntity->table().'.'.$this->targetKey.']}',
                    ])
                ->where(
                    $this->middleEntity->table().'.'.$this->middleSourceKey,
                    $this->getSourceValue()
                )
                ->asDefault()
                ->asCollection(false);
        }
    }
关联基础查询条件.