I am assigned a POC project to consciously attempt a record and its children from one block of code and the other block of code would try to see how an update on such locked records behave.
I am fine selecting a parent record for update, but figured out that FOR Update cannot be used in subquery, so i tried:
for(List<Opportunity> accList : [Select account.website from Opportunity where id='abcdefghijklmnop' For Update])
but it is not locking the account record, it is just locking the Opportunity.
Any ideas?