aggregateId

inline fun <reified C : Any> aggregateId(noinline read: (C) -> String?)

Reads the id of the aggregate a command of type C acts on from its body, as its @AggregateId property holds it: its request need not name its aggregate. read gives null for a creation that leaves it out, which then gets an id. C is a command this model decides.