Niklas Uhrberg wrote:
> Here there is really no need to have the AssociationRole hold the name
> "mother" or "father".
> This is indeed a very common way of modelling, but I also acknowledge
> that there is a benefit in the case of many multiple associations which
> should be named.
I've been reading more articles on the topic, and I now agree with your
earlier suggestion that it should be "Qualifier", so the previous
example would become:
interface Product
extends EntityComposite
{
ManyAssociation<Qualifier<Company,Vendor>> suppliers();
}
Where Company is a general entity and Vendor is the qualifier of the
Company in this particular suppliers association.
This seems to match the terminology descriptions I have found so far,
and how you have described it. Makes sense?
As for why this is better than just doing:
interface Product
extends EntityComposite
{
ManyAssociation<Vendor> suppliers;
}
and then:
interface Vendor
extends EntityComposite
{
Property<Long> performance();
Association<Company> company();
}
is that in the latter case Vendor is hardcoded to Company, and if
Qualifier is used the Vendor Qualifier can be used with other kinds of
Entities. For Blocket.se it might be used with Person entities, for
example, rather than Companies.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev