Core Concepts
Overriding and excluding
Customize generated data with set() and without()
In v2, partial selection is achieved via the fluent builder using .set() to override values and .without() to exclude fields. This works for simple fields, relations, arrays, and nested paths.
Basic overrides
Excluding fields
Nested overrides with relations
Arrays: sizes and overrides
Rules:
- Call
.with()before.set()/.without()when targeting nested paths. - Supplying negative amounts to
.with()throws.