Annotation Interface EntityId


Marks a property (field or getter) as the unique identifier of an entity within an aggregate structure.

The presence of this annotation enables automatic routing of updates to the correct entity instance inside an aggregate, based on identifier matching.

This is particularly important in aggregates that consist of nested entities, e.g.: a Project containing a list of Task entities. The framework uses the @EntityId-annotated property to match update messages with their corresponding entity.

You can annotate either a field or its getter method.

See Also: