On 2010-02-08 03.05, Stanislav Muhametsin wrote:
I have an entity, which has a mixin implementing Initializable interface. Now, when querying the entitystore for that entity, the initialize() method of that mixin does not get called on entities, returned by query. Is this on purpose? Somehow, I expected it to be called even then. Otherwise I do not see much difference between Initializable and Lifecycle interfaces for entity mixins.
I implemented a testcase for Initializable, and I think I know what the problem is. Mixins in entities are lazy-loaded, and so you won't get a call to initialize() until you call a method on the mixin that you found using a query. So, I'm guessing you just did a query, got some entities returned, but no initialize() calls. Which is correct.
Is that an accurate description of your case? /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

