Skip to content

ActiveQuery can not be built in DQLQueryBuilder #548

@olegbaturin

Description

@olegbaturin

Description

The error occurs then trying to use ActiveQuer in a subquery.

$q = Order::query()->select(new Expression('1'));
Item::query()->where(new Exists($q))->all();

Yiisoft\Db\Exception\NotSupportedException: Expression of class Yiisoft\ActiveRecord\ActiveQuery can not be built in Yiisoft\Db\Pgsql\DQLQueryBuilder in \vendor\yiisoft\db\src\QueryBuilder\AbstractDQLQueryBuilder.php:483

Package version

No response

PHP version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions