On Tue, Aug 2, 2011 at 4:04 PM, Rickard Öberg <[email protected]> wrote:
> The above should be possible. But, for the "normal case", i.e. I want a > string to default to "" or an integer to 0, or a List to be new ArrayList(), > it doesn't work as well. Now that Values can be defaulted as well, i.e. > "@UseDefaults Property<SomeValue> foo()" will actually cause an instance to > be created, that definitely cannot be done through assembly. So, > @UseDefaults still has its place. I think my suggestion is that useDefaults is moved from the interface to the PropertyDeclaration, i.e. module.forMixin( Abc.class ).useDefaultsFor().someProperty(); > Right, true, that can't be done, since the EntityStore is resolved from the > point of view of the Entity, which would have none available if pure onion > is used. Hmm... what would the benefit be with using onion compared to the > more hexagonal approach that we use now? I am not sure if we are loosing too much or not. I am making an observation. Perhaps it is as simple as recognizing that for persistence we manage to hide it at a whole new level, on the z-axis under the whole thing... Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/24svnvk I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

