Georg Ragaller wrote: > To complete my understanding: > > Is the use of CompositeBuilder.stateOfComposite() always needed, or only > if I want to have constraints checked during the instantiation phase or > when I must use it because of ImmutableProperty instances in the entity? > > Or the other way round: When will I use UnitOfWork.newEntity(...)?
CompositeBuilders are used to make the instantiation phase longer, so that you have the chance to put the newly instantiated Composite into a valid state. Given constraints it would not work to just instantiate it, since it would then be in an invalid state. If you have entities whose state is valid immediately upon calling newEntity(), then by all means do that. This is only for the other cases, where you have to create some possibly quite complex state before actually instantiating it. Not sure I can be more specific than that. /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

