cml_batch_add_elements
Batch create multiple domain objects like entities, value objects, and commands in a single call with validation before any are added.
Instructions
Batch creation of multiple domain objects (entities, value objects, identifiers, events, commands, services) in a single call. More efficient than individual calls. Validates all elements before creating any.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commands | No | Commands to create | |
| entities | No | Entities to create | |
| failFast | No | Stop on first error (default: true). Set to false to collect all errors. | |
| services | No | Domain services to create | |
| contextName | Yes | Name of the bounded context | |
| identifiers | No | ID value objects to create (following DDD best practices) | |
| domainEvents | No | Domain events to create | |
| valueObjects | No | Value objects to create | |
| aggregateName | Yes | Name of the aggregate |