We have a list of MyCustomObject__c which have a Master/Detail relationship with Account and we set on the Account a reference to the last of MyCustomObject__c, which we call Last_MyCustomObject__c.
When we try to export the data using `sfdx force:data:tree:export -p -q myquery.txt" the export fails saying reference MyCustomObject__c not found for Last_MyCustomObject__c. What is the right way get this data so it can be imported into a scratch org?
Ideally if we would write a query that would be like
Select ID, Name, Last_MyCustomObject__c from Account
Select ID, Name, Last_MyCustomObject__c, (Select Id, Name from MyCustomObject__c where Id = Last_MyCustomObject__c ) from Account.
Additionally, if we want to import other objects related to the same Account, how can we do that, if it will not be possible to express the export in a single query?