QueryAlias
Other logical paths a query may use for this field, typically its names before a rename.
Each value is a full logical path of the query model, such as state.oldName. Filters, sorts, projections and aggregations may use an alias (or a path below it); admission replaces it with the field's canonical path, so results, sort uniqueness, protection and cursors are all decided by the canonical name, and the capability descriptor lists the aliases under the canonical field. A field kept only for old callers is marked with Kotlin's deprecation annotation instead.
An alias names one field, and it holds wherever its class is held. Two query models read it, whatever its root: each state's snapshot model, the state at state, and each aggregate's events model, every event's body at events.body (so two events may hold the class under one name). The build refuses, naming the places, an alias on a class one of them holds at two places (two properties of a state or of one event, or two events under different names), so a state. alias on a class two events hold under different names is refused too; one below a map's values; and one that is the path of a field of that model (another one's, its own, or a system field's such as tenantId). Every alias, a command's too, must be a query path; nothing else is checked of a command's, which no query model holds and whose mask reads no alias.
An alias is a query's input alone. The stored snapshots, a query's answers and the published stream carry the field's own name, so renaming a state field still breaks whoever reads that JSON, and the Manifest's compatibility check reports the rename as breaking, alias or not.
data class OrderState(
@field:QueryAlias("state.customer")
val buyer: Buyer,
)