<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSManagedObjectContext/shouldDeleteInaccessibleFaults",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSManagedObjectContext(py)shouldDeleteInaccessibleFaults"
  },
  "title" : "shouldDeleteInaccessibleFaults"
}
-->

# shouldDeleteInaccessibleFaults

A Boolean value that determines whether the context turns inaccessible faults into deleted objects.

```
var shouldDeleteInaccessibleFaults: Bool { get set }
```

## Discussion

Use this property to control how the context behaves when it encounters an *inaccessible fault* — an object with no underlying data in the persistent store. For example, you might fetch an object that has a to-many relationship, but then a background context deletes the related objects from the store before you traverse that relationship.

When this property is set to <doc://com.apple.documentation/documentation/Swift/true>, the context returns a managed object with the following characteristics:

- The object’s attributes, including scalars, nullable, and mandatory attributes are all set to `nil` or `0`.
- The object’s [`isDeleted`](/documentation/CoreData/NSManagedObject/isDeleted) property is set to <doc://com.apple.documentation/documentation/Swift/true>, which adds the object to the context’s [`deletedObjects`](/documentation/CoreData/NSManagedObjectContext/deletedObjects) set.
- The object is exempt from validation rules, including optionality, because the object is nonexistent and the context discards it when you next call [`save()`](/documentation/CoreData/NSManagedObjectContext/save()) or [`reset()`](/documentation/CoreData/NSManagedObjectContext/reset()).

When the context returns an object with these characteristics, your app can continue running and process this object in the same way as any other deleted object.

When this property is set to <doc://com.apple.documentation/documentation/Swift/false>, the context throws an exception.

The default value is <doc://com.apple.documentation/documentation/Swift/true>.

> Note:
> You can use query generations to pin a context to a stable view of the store’s data and isolate that context from changes that other contexts or processes make. For more information, see <doc://com.apple.coredata/documentation/CoreData/accessing-data-when-the-store-changes>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)