I had a very fruitful albeit wet discussion with Andreas Oberhack over
Associations on Friday evening.

There were essentially one point of contention;

 * Can an Association have behavior??

My stance is "No, but show me a use-case and I'll reconsider". OTOH,
if associations are complex enough, I could imagine that they are in
their own right an Entity instead, with two other associations
involved. "Employee" could be consider an Association complex to be
its own Entity.

One use-case that was discussed led to "A third-party will evaluate
the relationship...." (for instance a MortagageManager will evaluate
(among other things) the bank customer's relationship with the bank),
but the Association itself doesn't really carry enough information,
i.e. it doesn't have a field for the "source", which I think we should
enforce in Qi4j Runtime.

Now, another thing that struck me...

Does ManyAssociations require and/or allow the type to be Association?
Initially, I remember, we required it to be an Association, but I
think we removed it for convenience reasons. Is that really smart? And
like-wise, what happens if I ignore the Association requirement;

public interface Person extends EntityComposite
{
    Person spouse();
}


Cheers
Niclas

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

Reply via email to