5

In a SOQL query, I can get data for two different but related record types by combining the query, e.g.:

SELECT Id, Height__c, Width__c, (
     SELECT Id, X__c, Y__c 
     FROM Cells__r
) 
FROM ZV_Board__c
WHERE id =: boardId 

However, rather than using an Apex controller for my Lightning Component, I'd like to use the Lightning Data Service.

Is it possible for LDS to provide Cell values when used to retrieve a Board record?

6

Using the Lightning Data Service - Considerations page as reference, it appears that currently you are able to work with data across spanning relationships (lookup, master-detail) but not collections of records (subquery).

Lightning Data Service supports primitive DML operations—create, read, update, and delete. It operates on one record at a time, which you retrieve or modify using the record ID. Lightning Data Service supports spanned fields with a maximum depth of five levels. Support for working with collections of records or for querying for a record by anything other than the record ID isn’t available. If you must support higher-level operations or multiple operations in one transaction, use standard @AuraEnabled Apex methods.

  • 1
    That's my interpretation as well, but I figured I'd ask to see if anyone has a different (working) theory. I'll leave this open for awhile just to see whether we get any more responses... – Brian Kessler Dec 6 '17 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.