QueryReference

annotation class QueryReference(val aggregateName: String, val contextName: String = "")

Declares a field (or the elements of an array field) the id of an aggregate, so query consumers can look the aggregate up and link to it: @field:QueryReference("member"). contextName defaults to the bounded context of the model that declares the field. A property of type AggregateId needs no annotation: its aggregateId is a reference to the aggregate its own contextName and aggregateName name. A field has one semantic type, so this cannot combine with QueryTemporal, QueryDecimal, QueryMoney or QueryDuration.

Properties

Link copied to clipboard
Link copied to clipboard

The referenced aggregate's bounded context; empty, the default, is the declaring model's own.