I have the next code on my test Class:
parentAcc.ExternalId = '001';
insert parentAcc;
System.debug('parentAcc ExternalId' + parentAcc.ExternalId);
childAccount.ParentId = parentAcc.id;
insert childAccount;
System.debug('childAccount Parent ExternalId' + childAccount.Parent.ExternalId);
//DEBUGS
// parentAcc ExternalId 001
// childAccount Parent ExternalId null
If I search for childAccount.ParentId, it shows correctly the Id of the inserted parentAcc. If I search this information in accounts that I already have on my org, and their shows correctly the field Parent.ExternalId of their respective parent accounts.
So, I don't understand what is happening.