>> On 2010-07-06 16.58, Maik Böhne wrote: >> It feels natural to define that an entity in context xyz should play >> the roles a,b,c and in a different one it should be d and e. > > With the assembly version you'd have DomainFooEntity as before, with data, > and then each context would say "for each entity in the app implementing > data interface X, add role Y". So the information about what roles an entity > plays would be located near the context rather than near the entity. > > /Rickard
Exactly, it is located near the context not near an entity. Thought that was clear when i talked about different contexts. So i am with you and your proposal of doing it like this: module.addEntities(DomainFooEntity.class).withRoles(Some.class).withMixins(SomeMixin.class); But more important to me is that we do not need a Mixin, but a Trait (technically speaking) for implementing DCI. We could call it "Role" to stick with the DCI term, but in the end it is just a Trait. --Maik _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

