---
title: hasChanges
framework: swiftdata
role: symbol
role_heading: Instance Property
path: swiftdata/modelcontext/haschanges
---

# hasChanges

A Boolean value that indicates whether the context has unsaved changes.

## Declaration

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

## See Also

### Modifying models

- [changedModelsArray](swiftdata/modelcontext/changedmodelsarray.md)
