Skip to main content
pooja biswas perguntou em #Apex
Hi

I have university as parent object & college as child object.

There is a master-detail relationship defined on child object i.e college

I have a parent-child soql as follows

List<University__c> univList=[select Name,(select Name from colleges__r) from university__c];

system.debug(univList);

Also I have a child-parent soql as follows

List<college__c> univList=[select Name,university__r.Name from college__c

system.debug(univList);

when I execute the parent-child query I do not get any child related records .

Also when I execute child-parent query I do get the name of the college but the university ID I get but I want the university name also not the ID

please let me know.

Thanks

pooja

 
14 respostas
  1. 4 de out. de 2016, 11:08
    Hi Banwari

    That worked. Thanks for updating my knowledge.

    Thanks

    Pooja B
0/9000