Closed larsw closed 1 year ago
No. As described here (the section starting with "There's still one question that we haven't answered yet…"), an entity defines which aggregate it belongs to, as it can only be owned by one aggregate. This allows to detect that an entity is referred to from an aggregate it doesn't belong (the OrderItem
in the Customer
type in the example).
The current interface states
public interface Entity<T extends AggregateRoot<T, ?>, ID> extends Identifiable<ID> {}
Is this a cut'n'paste error? Shouldn't the bound of T be
Entity<T, ID
?