On 2010-10-23 18.33, Stanislav Muhametsin wrote:
Let's assume that I have really well thought it through, and I ended up
in decision that global uniqueness must be ensured. How can I ensure it
then, from Qi4j-point of view?
If only way to ensure global uniqueness is to make entity's identity
somehow depenendent on uniqueness qualifications, I think I might drop
this requirement in this particular case that brought up this whole
issue. Since things get complicated if I have entity composite with
multiple roles modifying its entity. But it would be nice to know what
tools I have to ensure global uniqueness, in case I actually need it in
future.
The way I would do it in Streamflow is to allow non-uniqueness when
executing a command, and then have an event-listener (since we do
EventSourcing) that checks whether the value is unique, and if not
handle it somehow (e.g. rollback). But it is supercomplicated.
OR, I might do the query and only make a 99% guarantee, since that is as
close as I can get.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev