---
title: hasChanges
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nsmanagedobject/haschanges
---

# hasChanges

A Boolean value that indicates whether the managed object has been inserted, has been deleted, or has unsaved changes.

## Declaration

```swift
var hasChanges: Bool { get }
```

## Discussion

Discussion true if the receiver has been inserted, has been deleted, or has unsaved changes, otherwise false. The result is the equivalent of OR-ing the values of isInserted, isDeleted, and isUpdated.

## See Also

### Getting State Information

- [managedObjectContext](coredata/nsmanagedobject/managedobjectcontext.md)
- [isInserted](coredata/nsmanagedobject/isinserted.md)
- [isUpdated](coredata/nsmanagedobject/isupdated.md)
- [isDeleted](coredata/nsmanagedobject/isdeleted.md)
- [isFault](coredata/nsmanagedobject/isfault.md)
- [faultingState](coredata/nsmanagedobject/faultingstate.md)
- [hasFault(forRelationshipNamed:)](coredata/nsmanagedobject/hasfault(forrelationshipnamed:).md)
- [hasPersistentChangedValues](coredata/nsmanagedobject/haspersistentchangedvalues.md)
