Niclas Hedhman wrote:
> On Mon, Sep 8, 2008 at 11:46 AM, Rickard Öberg <[EMAIL PROTECTED]> wrote:
> 
>> It should be the Entity that has the Association, i.e. Employer in this
>> cases. That's the only place where we can add deletion logic, i.e. in a
>> concern for Lifecycle.remove().
> 
> Ahhhh... Ok. Still a "BIG NOTE" needed...
> 
> But is the secondary Entity "created" as part of the AssociationRole
> creation, or is it created normally first and then placed into an
> AssociationRole?
> If the first, then ownership becomes natural, otherwise it is a bit weird.

It is up to the app code to create it. I.e. created first and then 
placed into a AssociationRole.

> In fact, doesn't this touch a lot on aggregation in general??

Indeed.

> If Entity had "newEntityBuilder" which only took its "aggregated"
> types as argument, it would never be unnatural to when it is
> aggregated or not.

That doesn't quite work though, since aggregated Entities might be 
created as a side-effect using concerns on Lifecycle.create(). In 
SiteVision that was the by far most common way to create aggregated 
entities.

/Rickard

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

Reply via email to