On Sat, Jun 25, 2011 at 2:17 PM, Rickard Öberg <[email protected]> wrote: > Why? Got example?
When designing the next project at MS, I am looking at a fairly complex model, and it is often not clear when to use Values and when to use Entities. Sometimes it is necessary for 'leaf' objects to be entities for no other reason than storage space (3 magnitudes worth) since the leaves are heavily shared. That requirement propagates to be either; "Resolve Property<Identity> manually" or "Make entities all the way up". Neither way is as nice as having Associations resolvable always. > So you're saying you want Values to be able to have Associations? If so, it > would basically have to be syntactic sugar for Property<EntityReference>, > and would require a running UoW in order to be able to load the entity, or > you're screwed. As for 'no UoW available' case, I would suggest that the Association resolves to a 'invalid Entity' where only the Identity can be accessed, and all others result in an Exception, similar to an Entity being used outside a UoW today. 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

