Skip to content

Calling .debug() breaks countQuery() #86

@WacSma

Description

@WacSma

Hi

Thanks for great work!

So here are steps to repro:
new Query('Account').debug().countQuery();

throws:
Error on line 1587, column 1: System.QueryException: unexpected token: ')' Class.Query.countQuery: line 1587, column 1

After removing the debug() call it works fine:
new Query('Account').countQuery();

This is because debug() calls toQueryString() -> formQueryStringPreformat() -> formFieldString(), which does functionFieldList.isEmpty() too early and adds Id to field set.

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