src/Leevel/Database/Ddd/Entity.php
public function idCondition(): array
    {
        if (null === (($ids = $this->id()))) {
            $e = sprintf('Entity %s has no primary key data.', static::class);

            throw new InvalidArgumentException($e);
        }

        if (!is_array($ids)) {
            $ids = [$this->singlePrimaryKey() => $ids];
        }

        return $ids;
    }
public function idCondition(): array
    {
        if (null === (($ids = $this->id()))) {
            $e = sprintf('Entity %s has no primary key data.', static::class);

            throw new InvalidArgumentException($e);
        }

        if (!is_array($ids)) {
            $ids = [$this->singlePrimaryKey() => $ids];
        }

        return $ids;
    }
获取查询键值.

@return array