Sep 11th, 2012, 05:13 PM
Entities, Aggregates and their boundaries
I'm getting to know Spring Roo using a very simple model of Invoice and Line Items.
'Invoice' is my root entity, which holds 'Line Items' as its aggregates.
When building this model in Spring Roo, I seem to be consistently guided toward making Line Item an entity, however, in my model, I don't want to access Line Items directly, as that would violate my entities boundary.
I want all access/add/mutate to the Line Item to happen via the the root entity, that being the Invoice.
What is considered best practice for this type of model?
Tags for this Thread