<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/FetchRequest/init(entity:sortDescriptors:predicate:animation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12FetchRequestV6entity15sortDescriptors9predicate9animationACyxGSo19NSEntityDescriptionC_SaySo16NSSortDescriptorCGSo11NSPredicateCSgAA9AnimationVSgtcfc"
  },
  "title" : "init(entity:sortDescriptors:predicate:animation:)"
}
-->

# init(entity:sortDescriptors:predicate:animation:)

Creates a fetch request for a specified entity description, based on a
predicate and sort parameters.

```
@MainActor @preconcurrency init(entity: NSEntityDescription, sortDescriptors: [NSSortDescriptor], predicate: NSPredicate? = nil, animation: Animation? = nil)
```

## Parameters

`entity`

The description of the Core Data entity to fetch.

`sortDescriptors`

An array of sort descriptors that define the sort
order of the fetched results.

`predicate`

An
<doc://com.apple.documentation/documentation/Foundation/NSPredicate>
instance that defines logical conditions used to filter the fetched
results.

`animation`

The animation to use for user interface changes that
result from changes to the fetched results.

## Discussion

Use this initializer if you need to explicitly specify the entity type
for the request. If you specify a placeholder `Result` type in the
request declaration, use the
[`init(sortDescriptors:predicate:animation:)`](/documentation/SwiftUI/FetchRequest/init(sortDescriptors:predicate:animation:)) initializer to
let the request infer the entity type. If you need more control over
the fetch request configuration, use [`init(fetchRequest:animation:)`](/documentation/SwiftUI/FetchRequest/init(fetchRequest:animation:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)