function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
muthu.swimuthu.swi 

Apex: Getting a weird error while deleting a record

Hi
 
I have two entities Master and detail with no relationship. So, when I delete master I am deleting the detail reocords in Before Delete trigger. And, my code in the trigger is simple as:
 
if (Trigger.isDelete && Trigger.isBefore)
{
     for (Master__c master : Trigger.old)
     {
          Detail__c[] details = [Select Id from Detail__c Where Master__c = :master.Id];
          delete details;
     }
}
 
But I am getting this error when I delete the master record..
 
System.Exception: ORA-01086: savepoint 'ORACLE_SVPT_3108' never established
 
Could anyone help fix this? Thanks in advance.
 
Muthu
 
Ron HessRon Hess
I've not seen this problem, is it still happening?
if so, it may be a bug, can you file a detailed bug report.

thanks for reporting this.
mtbclimbermtbclimber
Is this still reproducible?

If there is no relationship then is Detail__c.Master__c a text field where you are putting the Id value for the Master__c object?

Finally, you do know that this code will not survive the governor limits if you ever try to delete 21 Master__c records through the API, right?
muthu.swimuthu.swi
I am not getting this error now, and not able to replicate.
 
Thanks
 
Muthu