PersistedWriteOptions
Defined in: packages/ddd-core/persistence/decorators/persisted-write.decorator.ts:18
Options for PersistedWrite. The aggregate is always the method’s first argument.
Type Parameters
Section titled “Type Parameters”TEntity
Section titled “TEntity”TEntity
TConstraint
Section titled “TConstraint”TConstraint extends string = never
Properties
Section titled “Properties”cache?
Section titled “cache?”
optionalcache?:CacheOptions<TEntity>
Defined in: packages/ddd-core/persistence/decorators/persisted-write.decorator.ts:26
Write-through, eviction and barrier/CAS settings, as accepted by
@Cache({...}). Omit for a repository without a cache.
dialect?
Section titled “dialect?”
optionaldialect?:IPersistenceDialect
Defined in: packages/ddd-core/persistence/decorators/persisted-write.decorator.ts:35
Dialect overriding the registered one, for a repository on another store.
otherwise?
Section titled “otherwise?”
optionalotherwise?: (error,entity) =>unknown
Defined in: packages/ddd-core/persistence/decorators/persisted-write.decorator.ts:41
Translator for errors that match no unique mapping, as accepted by
@MapPersistenceErrors({ otherwise }).
Parameters
Section titled “Parameters”unknown
entity
Section titled “entity”TEntity
Returns
Section titled “Returns”unknown
unique?
Section titled “unique?”
optionalunique?:UniqueErrors<TEntity,TConstraint>
Defined in: packages/ddd-core/persistence/decorators/persisted-write.decorator.ts:32
Domain errors per violated unique constraint, keyed by entity property, as
accepted by @MapPersistenceErrors({ unique }).