Skip to content

.with(_ field: KeyPath): error when the id is not found #117

@davuthdv

Description

@davuthdv

Query

Category.query(on: db)
    .filter(\.$id == id)
    .with(\.$translations) // children
    .first()

Steps to reproduce

  • Running query above with id already existed in db -> it works
  • Running the same query above with id that doesn't exist

Expected behavior

It should still works

Actual behavior

It crashes with error error: syntax error at or near ")" (scanner_yyerror)
It's the issue with .with(field)

Environment

  • Vapor Framework version: 4.0.0-beta-3
  • fluent-kit: 1.0.0-beta.2.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions