---
title: version
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nsincrementalstorenode/version
---

# version

The version of data in the receiver.

## Declaration

```swift
var version: UInt64 { get }
```

## Discussion

Discussion The version number is used by the persistent store coordinator to detect and handle merge conflicts. The version number should be stored with the record. The version number should (implicitly) start at zero (where zero indicates an unsaved object in memory) and be incremented by exactly one every time you save. In addition, you increment the version number when you or the Core Data framework have marked the associated managed object for optimistic locking.

## See Also

### Managing Node Data

- [objectID](coredata/nsincrementalstorenode/objectid.md)
- [update(withValues:version:)](coredata/nsincrementalstorenode/update(withvalues:version:).md)
- [value(for:)](coredata/nsincrementalstorenode/value(for:).md)
