jetstreamapp / soql-parser-js

Javascript SOQL parser
https://jetstreamapp.github.io/soql-parser-js/
MIT License
79 stars 20 forks source link

getFlattenedFields returns incorrect results if relationship field is grouped and you are grouping for only one field #113

Closed ABenassi87 closed 4 years ago

ABenassi87 commented 4 years ago

Description

getFlattenedFields() does not return correct fields if a relationship field is used in a group-by.

For the following query, salesforce returns the records with the fields Name: 'abc', expr0: 1'

SELECT Account.Name, AVG(Amount)
FROM Opportunity
GROUP BY Account.Name
LIMIT 5

Related #98