On Fri, Aug 5, 2011 at 12:12 PM, Rickard Öberg <[email protected]> wrote:

> So, does anyone have a case with several EntityStores being involved in one
> UoW? If no, can we enforce that only one can be involved.

As you said, I doubt it is supported at the moment...

> The reason is that the current commit handling is a bit complicated due to
> having to allow several EntityStores to be used. Not a single EntityStore
> supports this properly though, AFAIK. I would therefore prefer to make it a
> "1 phase commit", which would probably also make it easier to support the
> EventStore commit.

I am actually thinking that we should make a much more radical change,
or at least explore it.

IF an entity is redefined to be "A Value currently assigned to an
Identity, which is also a Value", then the GutFeeling(tm) says that
entity management becomes a lot easier, faster and there is a natural
and simple "detach"/"attach" concept.

public interface Entity<T>
{
    Property<Identity> identity();
    Property<T> value();
}

provided of course that we have Association support in Values.


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

Reply via email to