src/Leevel/Database/Ddd/Relation/HasMany.php
public function addRelationCondition(): void
    {
        if (static::$relationCondition) {
            $this->select->where(
                $this->targetKey,
                $this->getSourceValue()
            );

            $this->select->whereNotNull(
                $this->targetKey
            );
        }
    }
public function addRelationCondition(): void
    {
        if (static::$relationCondition) {
            $this->select->where(
                $this->targetKey,
                $this->getSourceValue()
            );

            $this->select->whereNotNull(
                $this->targetKey
            );
        }
    }
关联基础查询条件.