In Core Data, the `prepareForDeletion` method is called when a managed object is about to be deleted, allowing for resource cleanup and relationship management.
However, these lifecycle methods are not triggered during batch operations or when specific managed object subclasses are not involved.
SwiftData, which uses Core Data as its default storage implementation, does not provide similar functionality to these notification timings.
Persistent History Tracking in Core Data and SwiftData does not include specific change information in the notification and developers need to retrieve the changes from the database manually.