pyax fails to return results when COUNT() is used in SOQL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyax |
Fix Committed
|
High
|
Kevin Shuk |
Bug Description
Consider the following SOQL statement:
Select COUNT() from Solution s WHERE (s.Status = 'Published') AND (s.IsDeleted = False) AND (s.LastModifiedDate > 2008-08-
The results pyax reports from connection.py in the __processQueryR
The problem is the query_result says {u'records': None, u'done': True, u'queryLocator': None, u'size': '106'}.
The fix would be to add the following exception code as follows:
if (done is True) and (len(query_
return query_result_batch
This is a hack but it works so long as I get something back from the SOQL rather than nothing which is what pyax wants to give me.
Perhaps the development team can give me a more elegant solution in a later release however since I need this to work now I am using my own hack in the meantime.
I suspect the pyax development team simply did not expect people to use the COUNT() function which can be useful even though it does not return any SalesForce objects it does return the number of items a SOQL would return.
Refined the fix for this bug a bit:
if (done is True) and (len(query_
return query_result_batch
Let's just say this works for me...