---
title: sourceExpression
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nsentitymapping/sourceexpression
---

# sourceExpression

The source expression for the entity mapping.

## Declaration

```swift
var sourceExpression: NSExpression? { get set }
```

## Discussion

Discussion The source expression is used to obtain the collection of managed objects to process through the mapping. The expression can be a fetch request expression, or any other expression that evaluates to a collection.

## See Also

### Managing Source Information

- [sourceEntityName](coredata/nsentitymapping/sourceentityname.md)
- [sourceEntityVersionHash](coredata/nsentitymapping/sourceentityversionhash.md)
