Skip to content

[Bug]: Query failed if there is only false field in the select params #2344

Closed
zenstackhq/zenstack-v3
#657

Description

@jiashengguo

The below code will show error:

    await db.user.findMany({
      select: {
        id: false,
      },
    }),
    reason: 'db-query-error',
    model: undefined,
    dbErrorCode: 'SQLITE_ERROR',
    dbErrorMessage: 'near "from": syntax error',
    rejectedByPolicyReason: undefined,
    sql: 'select from "User" ',

It generate a select statement without any field to be selected which cause the SQL error.

Activity

  1. added theissue type on Feb 6, 2026
  2. added theissue type on Feb 10, 2026
  3. ymc9 commented on Mar 2, 2026

    @ymc9
    Member

    Fixed in 3.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions