On 6/25/11 14:23 , Niclas Hedhman wrote:
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.
See your point!
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.
That would be nice, since there is also a problem now whereby if an
ManyAssocation has an entity that has a removed Entity it is tricky to
fix it. Allowing an Entity to be loaded with just the Identity would
sort of fix that, as one can then remove it from the ManyAssociation
quite easily.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev