Gentlemen, simple question. Does Apex wait for the DML operation of inserting accounts to complete before moving onto the next line (SOQL statement)?
insert parentAcctList;
List<Id> acctIdList = [SELECT id
FROM Account];
for(Id acctId : acctIdList) {
Contact cont = new Contact(lastName = 'Lee',
firstName = 'Robert',
title = 'General',
AccountId = acctId);
insert cont;