hook_salesforce_query_alter only provides one parameter - the SalesforceSelectQuery $query. Often you need to know which mapping the query applies to in order to alter the query effectively.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | salesforce-query-alter-params-2714013-2.patch | 1.73 KB | wxactly |
Comments
Comment #2
wxactly commentedPatch moves the salesforce_query alter invocation out of the Salesforce class, and passes the mapping object to hook implementations.
hook_salesforce_query_alter(SalesforceSelectQuery &$query, $mapping)Comment #3
aaronbaumanyup, +1 for this.
Comment #4
wxactly commentedArgh - going to have to rethink this. If you have multiple mappings for the same salesforce object, the module scoops them all up into one query and the patch in #2 only passes the last mapping object in the loop. That makes the patch fairly buggy for the use case I was hoping it would work for.
Comment #5
antiorario commentedIs there any progress on this? If the issue needs more hands, I could perhaps think about it.
Comment #6
aaronbauman7.x is no longer supported