On Saturday 19 April 2008 18:44, Tobias Ivarsson wrote: > Hi! I ran into this problem just now: > > The newInstance( UnitOfWorkInstance unitOfWork, Object value ) method in > AssociationContext assumes that the value object passed in can be cast to > List. This object is retreived from an EntityState-object in the > getAssociation( Method associationMethod ) method in > EntityCompositeInstance. But the methods in EntityState only promises to > return Collection object, not List objects.
I am not sure where you are reading, but the reason for the Collection is that it can either be a List or a Set. I only find one cast to List, which is after the associationType has been determined to be a ListAssociation in which case the contract is that it must be a List, otherwise it is a Set, unless it is not a ManyAssociation. I presume that the EntityStore implementor is responsible to return a List/Set in accordance with what was given previously, in the EntityState.setManyAssociation(). Cheers -- Niclas Hedhman, Software Developer I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

