Niclas Hedhman wrote: > Ok the fog (perhaps that is from the Romanian weekend trip) is > clearing a bit. Someone got to document this, so I need to understand > this well... > > 1. Entities can reference another Entity via an Association or an > AssociationRole.
The reference is an Association, but it can point either directly to an Entity or via a AssociationRole which adds a Role Entity apart from the Associated Entity. > 2. An Association is a direct reference to another Entity, which does > not infer ownership/aggregation. Correct! The Role Entity in the AssociationRole is considered owned though, so if the Entity with the Association is Removed the Role Entity in all Associations with AssociationRoles should be removed. > 3. An AssociationRole is one "primary" reference to another Entity (as > in Association), and an additional "secondary" reference to another > Entity, which in turn describes the primary reference. No semantics > are imposed on the secondary Entity. Both primary and secondary > entities are without inference of ownership/aggregation. Almost. As above the secondary Entity, the Role, is considered owned. In theory I guess they could be shared with other Associations, but I'm not sure that is a good idea. > 4. An AssociationRole is identified (equals/hashCode) by the combo of > the two Entities, i.e. IF and ONLY if both Entities have the same > Identity, the AssociationRoles are equal. Yup. /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

