Niclas Hedhman wrote:
> Well, we need to explain how things MUST be done and have convincing
> arguments why it is that way.
>
> In reality, I think a lot of "PartOf" entities will be 'promoted' to
> "Root" entities as a result. I think it can be rather hard to figure
> out differences...
>
> For instance; An engine is a "PartOf" entity of Car, but the Car can
> change Engine and the old one goes in for reconditioning and end up in
> a Store for sale. Apparently, the Engine is a root entity in its own
> right.
To me it seems like "root entity" is a role rather than an inherent
property of something. It all depends on, as usual, the context.
Sometimes it is this, sometimes it is that, even though it's the same
"thing".
> Should such a mechanism (Identity within Aggregate) be supported
> intrinsically, or just as a recommended pattern?
We definitely have to come up with a good way to express it. As queries
is one way I guess, although an XPath-ish approach would work as well
("car/tire/frontleft"). Simply having a "path name" property on the
entity should make it possible to do it. Or just consider "identity" to
be this name, and then access things using that.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev