---
title: NSQueryGenerationToken
framework: coredata
role: symbol
role_heading: Class
path: coredata/nsquerygenerationtoken
---

# NSQueryGenerationToken

A token that indicates which generation of the persistent store is being accessed.

## Declaration

```swift
class NSQueryGenerationToken
```

## Mentioned in

Accessing data when the store changes

## Overview

Overview When a managed object context is pinned to a specific generation of the app data, a query generation token will be associated with that context.

## Topics

### Identifying Generations of App Data

- [current](coredata/nsquerygenerationtoken/current.md)

### Initializers

- [init(coder:)](coredata/nsquerygenerationtoken/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Conflict Management

- [NSConstraintConflict](coredata/nsconstraintconflict.md)
- [NSMergeConflict](coredata/nsmergeconflict.md)
- [NSMergePolicy](coredata/nsmergepolicy.md)
