---
title: "init(entityName:)"
framework: coredata
role: symbol
role_heading: Initializer
path: "coredata/nsfetchrequest/init(entityname:)-5anoo"
---

# init(entityName:)

Returns a fetch request configured with a given entity name.

## Declaration

```swift
convenience init(entityName: String)
```

## Parameters

- `entityName`: The name of the entity to fetch.

## Return Value

Return Value A fetch request configured to fetch the entity named entityName.

## Discussion

Discussion This method provides a convenient way to configure the entity for a fetch request without having to retrieve an NSEntityDescription object. When the fetch is executed, the request uses the managed object context to find the entity with the given name. The model associated with the context’s persistent store coordinator must contain an entity named entityName.

## See Also

### Related Documentation

- [Predicate Programming Guide](apple-archive/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html.md)
- [Core Data Programming Guide](apple-archive/documentation/Cocoa/Conceptual/CoreData.md)

### Managing the Fetch Request’s Entity

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