Niclas Hedhman wrote:
> Taking an example where the domain model is using "Role" is
> counter-productive, as I think it blurs our perceptions.
The domain model was not using "Role", it was being used as Association
Role (i.e. a framework type). But I'll use the example in the referenced
article instead, which hopefully is more clear:
interface CompanyEntity
extends EntityComposite
{
ManyAssociation<Role<ProductEntity,VendorRole>> supplies();
ManyAssociation<Role<ProductEntity,CustomerRole>> buys();
}
interface VendorRole
extends EntityComposite
{
Property<Integer> performance();
}
interface CustomerRole
extends EntityComposite
{
Property<String> creditRating();
}
interface ProductEntity
extends EntityComposite
{
ManyAssociation<Role<CompanyEntity,VendorRole>> suppliers();
ManyAssociation<Role<CompanyEntity,CustomerRole>> customers();
}
> There is also the constant balance between when is the "Role" part of
> the association vs becoming its own intermediate entity. For instance,
> are "roles" searchable? If not, then the intermediary "Role" entity
> may have to exist in a movie application.
Roles can be made searchable in the RDF impl anyway. Not that difficult,
AFAICT.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev