I'm having trouble putting together a SOQL query.
Basically i have a parent object (Opportunity), with multiple child objects (Borrower_Pair__c). The relationship from the child to parent is created through a master-detail field (Owner_Application__c) on the child (Borrower_Pair__c).
The goal is to get the ids of the all the child objects.
Here is what i have so far...
List<sObject> borrPairIds = [SELECT Id FROM Borrower_Pair__c WHERE Owner_Application__c.Id = :oppId];
Where :oppId is the Id of the opportunity. However when i run this, i get the error in the title.
The full error is
Didn't understand relationship 'Owner_Application__c' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. (31:37)