Niclas Hedhman wrote:
> On Sun, Jun 15, 2008 at 11:57 PM, Michael Hunger <[EMAIL PROTECTED]> wrote:
>> as there is no javadoc on the method in EntityState, what is the return type 
>> to be expected?
> 
> Uhhh....
> 
>> Default implementation in EntityStateInstance is:
>>     public Collection<QualifiedIdentity> setManyAssociation( String 
>> qualifiedName, Collection<QualifiedIdentity>
>> newManyAssociation )
>>     {
>>         manyAssociations.put( qualifiedName, newManyAssociation );
>>         return newManyAssociation;
>>     }
> 
> I suspect that this is intended for fluent APIs, but right now I can't
> see the usecase, nor does it seem that any code use (?) the method
> yet.

I think the idea was that if the underlying EntityState does not have 
the assocation needed by the composite (i.e. 
getManyAssociation(qualifiedName) returns null), then it should be 
possible to create it this way, and that the EntityState implementation 
should be allowed to replace the implementation by returning something 
else. Not sure if this is the best way to do it though... might be 
better to simply make it so that getManyAssociation never returns null 
(i.e. create a new collection if none has yet been persisted).

/Rickard


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

Reply via email to