<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSPropertyDescription",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPropertyDescription"
  },
  "title" : "NSPropertyDescription"
}
-->

# NSPropertyDescription

A description of a single property belonging to an entity.

```
class NSPropertyDescription
```

## Overview

A property describes a single value within an object managed by the Core Data Framework. There are different types of property, each represented by a subclass which encapsulates the specific property behavior—see [`NSAttributeDescription`](/documentation/CoreData/NSAttributeDescription), [`NSRelationshipDescription`](/documentation/CoreData/NSRelationshipDescription), and [`NSFetchedPropertyDescription`](/documentation/CoreData/NSFetchedPropertyDescription).

Note that a property name cannot be the same as any no-parameter method name of `NSObject` or `NSManagedObject`. For example, you cannot give a property the name “description”. There are hundreds of methods on `NSObject` which may conflict with property names—and this list can grow without warning from frameworks or other libraries. You should avoid very general words (like “font”, and “color”) and words or phrases which overlap with Cocoa paradigms (such as “isEditing” and “objectSpecifier”).

Properties—relationships as well as attributes—may be transient. A managed object context knows about transient properties and tracks changes made to them. Transient properties are ignored by the persistent store, and not just during saves: you cannot fetch using a predicate based on transients (although you can use transient properties to filter in memory yourself).

### Editing Property Descriptions

Property descriptions are editable until they are used by an object graph manager (such as a persistent store coordinator). This allows you to create or modify them dynamically. However, once a description is used (when the managed object model to which it belongs is associated with a persistent store coordinator), it *must not* (indeed cannot) be changed. This is enforced at runtime: any attempt to mutate a model or any of its sub-objects after the model is associated with a persistent store coordinator causes an exception to be thrown. If you need to modify a model that is in use, create a copy, modify the copy, and then discard the objects with the old model.

## Topics

### Accessing Features of a Property

[`entity`](/documentation/CoreData/NSPropertyDescription/entity)

The entity description of the receiver.

[`indexed`](/documentation/CoreData/NSPropertyDescription/isIndexed)

A Boolean value that indicates whether the receiver should be indexed for searching.

[`optional`](/documentation/CoreData/NSPropertyDescription/isOptional)

A Boolean value that indicates whether the receiver is optional.

[`transient`](/documentation/CoreData/NSPropertyDescription/isTransient)

A Boolean value that indicates whether the receiver is transient.

[`name`](/documentation/CoreData/NSPropertyDescription/name)

The name of the receiver.

[`userInfo`](/documentation/CoreData/NSPropertyDescription/userInfo)

The user info dictionary of the receiver.

### Supporting Validation

[`validationPredicates`](/documentation/CoreData/NSPropertyDescription/validationPredicates)

The validation predicates of the receiver.

[`validationWarnings`](/documentation/CoreData/NSPropertyDescription/validationWarnings)

The error strings associated with the receiver’s validation predicates.

[`-  setValidationPredicates:withValidationWarnings:`](/documentation/CoreData/NSPropertyDescription/setValidationPredicates(_:withValidationWarnings:))

Sets the validation predicates and warnings of the receiver.

### Supporting Versioning

[`versionHash`](/documentation/CoreData/NSPropertyDescription/versionHash)

The version hash for the receiver.

[`versionHashModifier`](/documentation/CoreData/NSPropertyDescription/versionHashModifier)

The version hash modifier for the receiver.

[`renamingIdentifier`](/documentation/CoreData/NSPropertyDescription/renamingIdentifier)

The renaming identifier for the receiver.

### Specifying Spotlight Support

[`indexedBySpotlight`](/documentation/CoreData/NSPropertyDescription/isIndexedBySpotlight)

A Boolean value that indicates whether Core Data adds the property’s value to the Core Spotlight index.

[`storedInExternalRecord`](/documentation/CoreData/NSPropertyDescription/isStoredInExternalRecord)

A Boolean value that indicates whether to write the property’s data in an external record file that corresponds to the managed object.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherited By

[`NSFetchedPropertyDescription`](/documentation/CoreData/NSFetchedPropertyDescription)

[`NSRelationshipDescription`](/documentation/CoreData/NSRelationshipDescription)

[`NSAttributeDescription`](/documentation/CoreData/NSAttributeDescription)

[`NSExpressionDescription`](/documentation/CoreData/NSExpressionDescription)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)