On Mon, Sep 8, 2008 at 10:49 AM, Rickard Öberg <[EMAIL PROTECTED]> wrote:
> 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.

Uhhh.... To clear this;

Association<Person> spouse();
vs

Association<AssociationRole<Person, Marriage>> spouse();
or
AssociationRole<Person, Marriage> spouse();

If the latter (which I assumed), then your explanatory text is incorrect.


>> 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.

Ok, so for the Employer example, the Position is a aggregate of the
Association between the Employer and Employee, and if the Position is
an actual company entity, with salary, rights, responsibilities and so
on, that must be one indirection further away?? Incredibly important
to understand.

I see if I can write something up later in the week. Otherwise have to
wait until when back in KL.

Cheers
Niclas

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to