Thanks Stan, I missed that discussion. I checket open issues in Jira, but I 
don't think my issue is related to Qi-272 or Qi-274, but I might be mistaken...

Isn't 

Property<String> someString();

regarded as a method needing an implementation (by Qi4j though) causing the 
implementing Mixin to be included in the composite? I'm confused and could well 
be mixing up terms.

Shouldn't it be possible to have an entity with only Properties and a 
Lifecycle??

Now I had to make a dummyMethod() in my entity interface and a dummy 
implementation in the Mixin in order for the Lifecycle to work. Seems wrong, 
when there's several Properties in use already, and some of them needs to be 
set upon entity creation...

Cheers,
Marc

On 11/01/2011, at 21.32, Stanislav Muhametsin wrote:

> This has been discussed before as well. Here is Niclas' explanation:
> --------------------------------------------------------------------
> 
> Ok, this comes back to the same thing;
> 
> * A declared mixin is NOT to say that it must be included in the
> Composite, but that it is a CANDIDATE for inclusion. The exact
> composition depends on what methods are found in the Composite.
> 
> This seems to be a very recurring issue, and perhaps the single most
> complicated thing in Qi4j to overcome initially.
> 
> 
> When you declare
> 
> @Mixins(SomeEntityMixinWithJustLC.class)
>   public interface SomeEntityWithJustLC
>       extends SomeEntity, EntityComposite
>   {
>   }
> 
> There is no method that needs an implementation provided by the
> SomeEntityMixinWithJustLC mixin, hence it will not be part of the
> Composite.
> 
> OTOH, if you declare
> @Mixins(SomeEntityMixinWithJustLC.class)
>   public interface SomeEntityWithJustLC
>       extends SomeEntity, EntityComposite, Lifecycle
>   {
>   }
> 
> then THERE IS something needed from the SomeEntityMixinWithJustLC
> mixin, namely the create() and remove() methods.
> 
> I don't know how this can be better documented, but it obviously needs
> some improvements and focus.
> 
> 
> Cheers
> Niclas
> 
> Quoting Marc Grue <[email protected]>:
> 
>> 
>> Is Lifecycle supposed not to work, if the entity/extended interface has no
>> methods but only Properties? Or am I missing something?
>> 
>> Cheers,
>> Marc
> 
> 
> 
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev


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

Reply via email to