Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result set from a relationship query is dropping all but one column from the related object #33

Open
ctaclas-8x8 opened this issue Aug 12, 2021 · 0 comments

Comments

@ctaclas-8x8
Copy link

Steps to reproduce:

  1. Form a query that retrieves a multiple columns from a related object
  2. Perform a query using ForcePreparedStatement executeQuery method
    Observed Result: Only one of the columns from the related object is included in result set. There is a mismatch between metadata colCount and the actual number of columnNames and values in their respective arrayLists in the returned ResultSet
    Expected Result:
    The ResultSet should include all expected columnNames and Values, and the number of columnNames and values from ResultSet should match the metadata colCount.

I have this query that returns results as expected when executed from Salesforce Workbench:

SELECT Id,Credit_Card_Address_1__c,Credit_Card_Address_2__c,Credit_Card_Expiration_Month__c,Credit_Card_Expiration_Year__c,Credit_Card_Holder_Name__c,Credit_Card_Type__c,Payment_Type__c,CreditCardLastName__c,CreditCardFirstName__c,Billing_Address__r.Apttus_Config2__Street__c,Billing_Address__r.Apttus_Config2__City__c,Billing_Address__r.Apttus_Config2__Country__c,Billing_Address__r.Apttus_Config2__PostalCode__c,Billing_Address__r.Apttus_Config2__State__c FROM Payment_Method__c WHERE Id = 'a0m53000000HRRSAA4'

The above query is getting a couple of columns from one table (Payment_Method__c), and is including a 5 columns from a related table (Billing_Address__r). When running this query through salesforce-jdbc, the result from ForcePreparedStatement executeQuery method is only including the first column from Billing_Address__r and seems to be dropping the remaining 4.
bizappsqe_autoeght_–_DbUtils_java

Looking at the raw data from PartnerService query method, it looks like SFDC is returning all the data from the related record, there is an SObject that includes all 5 of the expected fields from Billing_Address__r:
bizappsqe_autoeght_–PartnerService_java__Maven__com_ascendix_salesforce_salesforce-jdbc_1_1-SNAPSHOT

It appears that the child data from Billing_Address__r is getting dropped in the PartnerService toForceResultField method:
bizappsqe_autoeght_–PartnerService_java__Maven__com_ascendix_salesforce_salesforce-jdbc_1_1-SNAPSHOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant