On Tue, Sep 16, 2008 at 10:12 AM, Niklas Uhrberg <[EMAIL PROTECTED]> wrote: > Niclas Hedhman wrote:
>> Aggregate -> Aggregate (ok) >> Aggregate -> Entity (ok) >> Entity -> Aggregate (ok) >> Entity -> Entity (invalid) >> > > Clarification: Entity within Aggregate id=X -> Entity within Aggregate > id=Y is invalid Correct, my oversight... which indeed then makes the Association issue a lot harder, as the owning Aggregate must be known by all in the hierarchy (or very expensive traversals). > Let's delve deeper into the cons of permitting queries for non-root > entites, this is one of the least intuitive areas I think. > (Most difficult to find cons....) > One feeling I have is that making all entities searchable will make it > easier not to do design á la DDD by having external Services implement > all the behaviour > and entites being simple structs. But it needs more thinking.... Isn't then the Query somewhat in opposition with Aggregates hiding its internal structures? I mean, if you don't know the "bits" how can you create the query for searching for them? Would then that suggest that 'aggregate external' queries are not allowed? I.e. I can only search the "bits" if the Query is created within the Aggregate... My initial feeling about that is "Gooooood" as it encapsulates internal structures and a clean separation of what really is public can be achieved. Cheers Niclas _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

