---
title: predicate
framework: swiftdata
role: symbol
role_heading: Instance Property
path: swiftdata/fetchdescriptor/predicate
---

# predicate

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

## Declaration

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

## Discussion

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:).

## See Also

### Constraining the fetch

- [sortBy](swiftdata/fetchdescriptor/sortby.md)
- [fetchLimit](swiftdata/fetchdescriptor/fetchlimit.md)
- [fetchOffset](swiftdata/fetchdescriptor/fetchoffset.md)
- [includePendingChanges](swiftdata/fetchdescriptor/includependingchanges.md)
