I'm rolling out a new batch process and started getting Invalid Query Locator
error messages on certain batches (4 out of 85). Am I doing something wrong?
Start Method
String query = 'select field1__c, (select field2__c from Details__r) from Master__c';
return Database.getQueryLocator(query);
Execute Method
for(Master__c m : (List<Master__c>) scope) {
for(Detail__c d : m.Details__r) { // THROWS INVALID QUERY LOCATOR ERROR
// processing
}
}