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?

1 Answer 1


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... Commented Dec 6, 2017 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .