You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, salesforcer is providing weird results for relationship queries, including some unexplained "hanging" behavior (noted in #19 and #35). We should take a closer look into identifying and parsing these types of queries. Below are some odd examples currently happening with v0.1.3. Only Child-to-Parent queries made with the REST API appear to be working as expected (flattening).
Child-to-Parent Queries
REST API
sf_query("SELECT Name, Account.Id, Account.Name FROM Contact")
#> # A tibble: 3 x 3
#> Name Account.Id Account.Name
#> <chr> <chr> <chr>
#> 1 Ashley James 0016A0000035mJCQAY United Oil & Gas, UK
#> 2 Avi Green 0016A0000035mJ9QAI United Oil & Gas Corp.
#> 3 Babara Levy 0016A0000035mJAQAY Express Logistics and Transport
SOAP API
sf_query("SELECT Name, Account.Id, Account.Name FROM Contact", api_type="SOAP")
#> # A tibble: 3 x 3
#> Id Name Account
#> <lgl> <chr> <list>
#> 1 NA Ashley James <named list [4]>
#> 2 NA Avi Green <named list [4]>
#> 3 NA Babara Levy <named list [4]>
Parent-to-Child Queries
REST API
sf_query("SELECT Name, (SELECT LastName FROM Contacts) FROM Account")
#> # A tibble: 9 x 4
#> Name Contacts.totalSi… Contacts.done Contacts.records
#> <chr> <int> <lgl> <list>
#> 1 GenePoint 1 TRUE <named list [3]>
#> 2 United Oil & Gas, UK 1 TRUE <named list [3]>
#> 3 United Oil & Gas, Singa… 2 TRUE <named list [3]>
#> 4 Edge Communications 2 TRUE <named list [3]>
#> 5 Burlington Textiles Cor… 1 TRUE <named list [3]>
#> 6 Grand Hotels & Resorts … 2 TRUE <named list [3]>
#> 7 Express Logistics and T… 2 TRUE <named list [3]>
#> 8 University of Arizona 1 TRUE <named list [3]>
#> 9 United Oil & Gas Corp. 3 TRUE <named list [3]>
SOAP API
sf_query("SELECT Name, (SELECT LastName FROM Contacts) FROM Account", api_type="SOAP")
#> # A tibble: 24 x 4
#> Id Name Contacts LastName
#> <lgl> <chr> <list> <chr>
#> 1 NA GenePoint <named list [4]> <NA>
#> 2 NA <NA> <NULL> Frank
#> 3 NA United Oil & Gas, UK <named list [4]> <NA>
#> 4 NA <NA> <NULL> James
#> 5 NA United Oil & Gas, Singapore <named list [5]> <NA>
#> 6 NA <NA> <NULL> D'Cruz
#> 7 NA <NA> <NULL> Ripley
#> 8 NA Edge Communications <named list [5]> <NA>
#> 9 NA <NA> <NULL> Forbes
#> 10 NA <NA> <NULL> Gonzalez
#> # … with 14 more rows
In both examples above there is a wonky way of flattening the nested results which either returns unnecessary attributes data (REST API) or mismatches the attributes with the child data results (SOAP API). This needs to be fixed.
The text was updated successfully, but these errors were encountered:
StevenMMortimer
changed the title
Add Nested Parent-to-Child Relationship Queries
Fix Parsing of Relationship Queries
Sep 14, 2019
Currently, salesforcer is providing weird results for relationship queries, including some unexplained "hanging" behavior (noted in #19 and #35). We should take a closer look into identifying and parsing these types of queries. Below are some odd examples currently happening with v0.1.3. Only Child-to-Parent queries made with the REST API appear to be working as expected (flattening).
Child-to-Parent Queries
REST API
SOAP API
Parent-to-Child Queries
REST API
SOAP API
In both examples above there is a wonky way of flattening the nested results which either returns unnecessary attributes data (REST API) or mismatches the attributes with the child data results (SOAP API). This needs to be fixed.
The text was updated successfully, but these errors were encountered: