Alias

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Alias(vararg val value: String)

Former names of a command or event type.

Types are known by name, not by class: context.aggregate.Name, the class's simple name unless Name gives another. Renaming a type changes that name, and the log keeps the old one in history. Listing the old name here keeps that history readable: a stored event under a former name is read as this type, and a subscription that filters on either name matches both. For a command, the log records the name with each commit, and a request retried after the rename is still recognized as the same command.

A value without a dot is a former name within the same aggregate (context.aggregate.value); a value with dots is a full type name, for a type that moved from another aggregate or context. The model processor rejects a blank value, a value with exactly one dot (neither form), a value equal to the type's current name, and a former name that two types of the module claim.

@Name("ItemPut")
@Alias("ItemAdded")
data class ItemPut(val productId: String, val quantity: Int)

Parameters

value

the former names.

Properties

Link copied to clipboard
val value: Array<out String>