Skip to content

queryBuilder.toString() not working correctly #1743

@dizlexik

Description

@dizlexik

I'm not sure when this stopped working, but I'm using Objection v2.1.3 and when I call MyModel.query().toString() I get [object QueryBuilder] (same with .toSql()). Previously I would get a string of SQL. This is in an older part of my codebase that was written early last year sometime. Has the usage of toString/toSql changed since then? I'm looking at the documentation on the site and I don't see where I could be going wrong here. Any help would be very much appreciated. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions