Niklas Uhrberg wrote:
> I think the difference between the "single valued" association
> ("mother", "father") and many valued association is a bit disturbing.
> This is has nothing to du with Qi4J as such, it's just that
> the most straightforward way of naming the role is using the name of
> the property itself, and this is not possible in the may valued case.
If I understand you correctly we are then talking about, basically,
hashmaps. Like so:
interface Movie
extends EntityComposite
{
ManyAssociation<Qualifier<Person,Name>> actors();
}
where:
interface Name
extends EntityComposite
{
Property<String> name();
}
So that you can easily just use "name" as a simple qualifier (in this
case for the part name in the movie), and it's not hardcoded to this
particular usecase. This gets you the same thing, and also makes the
many-association searchable on the "role name", which I believe Michael
asked for (MapAssociation).
If it was now possible to use ValueComposites (yet to be defined)
instead of EntityComposites as Qualifiers I think we're basically home,
as that would make it easier to manage.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev