<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "swift: 5.9.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftData",
  "identifier" : "/documentation/SwiftData/FetchDescriptor/predicate",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftData"
    ],
    "preciseIdentifier" : "s:9SwiftData15FetchDescriptorV9predicate10Foundation9PredicateVyx_QPGSgvp"
  },
  "title" : "predicate"
}
-->

# predicate

The logical condition that determines whether the fetch includes a specific
model in its results.

```
var predicate: Predicate<T>?
```

## Discussion

Use this property to replace or remove the fetch descriptor’s predicate. If the
value is `nil`, any fetch using the descriptor will return all models of the
associated type.

The default value is the predicate you specify when calling [`init(predicate:sortBy:)`](/documentation/SwiftData/FetchDescriptor/init(predicate:sortBy:)).

---

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)