Quoting Rickard Öberg <[email protected]>:
On 2010-10-23 18.33, Stanislav Muhametsin wrote:
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.
Come to think of it, there is a variation that could work. Let's say
I have a User entity and I want some property to be unique. Then I
would introduce a Users collection entity, with a given id, and do
the query method, and on modification also modify the Users entity.
When the UoW completes it will get a concurrent modification
exception if another User was changed concurrently, hence ensuring
that the command is not running with another potential command that
screws things up.
Hmm, interesting workaround, and not even too much of a
performance-killer. Will that work on multiple Qi4j-apps running on
same entitystore but different processes?
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev