---
title: entity
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nsfetchrequest/entity
---

# entity

The entity specified for the fetch request.

## Declaration

```swift
var entity: NSEntityDescription? { get set }
```

## Discussion

Discussion When an NSFetchRequest instance is created with init(), it is expected that the entity property will be set.  If this property is not set, the fetch request fails upon execution.

## See Also

### Managing the Fetch Request’s Entity

- [init(entityName:)](coredata/nsfetchrequest/init(entityname:)-5anoo.md)
- [init()](coredata/nsfetchrequest/init().md)
- [entityName](coredata/nsfetchrequest/entityname.md)
- [includesSubentities](coredata/nsfetchrequest/includessubentities.md)
- [NSFetchRequestResultType](coredata/nsfetchrequestresulttype.md)
