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

# shouldInferMappingModelAutomatically

A flag indicating whether a mapping model should be created automatically.

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

## Discussion

If this flag is set to <doc://com.apple.documentation/documentation/Swift/true> and the value of the [`shouldMigrateStoreAutomatically`](/documentation/CoreData/NSPersistentStoreDescription/shouldMigrateStoreAutomatically) is <doc://com.apple.documentation/documentation/Swift/true>, the coordinator attempts to infer a mapping model if none can be found. The default for this flag is <doc://com.apple.documentation/documentation/Swift/true>.

---

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)