Using Projection Sets
Learn how to create and apply projection sets for reusable property configurations. Covers set creation, generic slots, applying sets to projections, and union imports.
Projection sets are reusable collections of property definitions that you can apply to multiple projections. Instead of manually configuring the same audit fields, timestamp columns, or standard metadata properties on every projection, you define them once in a set and apply the set wherever needed.
Why Use Projection Sets
Creating a Projection Set
Generic Slots
Generic slots allow a single set to adapt to different contexts. Rather than creating separate sets for each variation, you define a slot that gets resolved per-property at apply time.
Applying a Set to a Projection
Common Set Patterns
| Set Name | Properties | Use Case |
|---|---|---|
| Audit Fields | createdAt, updatedAt, createdBy, updatedBy | Track who created and modified records |
| Soft Delete | isDeleted, deletedAt, deletedBy | Support logical deletion without removing data |
| Tenant Isolation | tenantId, partitionKey | Multi-tenant data separation |
| API Metadata | requestId, correlationId, timestamp | Standard fields on API response types |
| Versioning | version, previousVersion, versionTimestamp | Track entity version history |
Set Drift Detection
When a projection set is updated after it has been applied to projections, those projections may fall out of sync with the latest set definition. NeoArc detects this drift automatically and highlights affected projections so you can review and reapply the updated set where needed.