Rickard Öberg wrote:
> 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.
>
>   
   Seems like we have the same understanding.

But lets not forget that I want to have the possibility to qualify the 
associations not only with values like dates but also with entities, 
this is a very common need.
Don't know if this is at odds with using values, but they typically 
don't contain references to entities....
Having the qualifying entities attached to the association makes this 
very pedagogical (as opposed to just being traversed in a chain to the 
associated entity)


PS. I note that my English spelling is very different (worse) when 
writing email in a hurry, really disturbing. I can't believe that I 
don't discover all the errors immediately... DS.



/Niklas


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


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

Reply via email to