Thanks for the info.
I agree about readability of guids, but hilo doesn't solve the problem
in many cases.
In my case, I'm implementing CQRS pattern where commands are sent by
the client ui. An initial "create person" command might be followed
by several "do something with this person" commands before the query
store is ever updated. It's important that the "create person"
command itself is responsibile for ID generation before the command is
sent, such that the ID can then be used in the subsequent commands.
In other words - raven is not around yet to provide the key.
var cmd1 = new HireEmployee { Name = "John Doe" };
var cmd2 = new AddEmployeeToGroup { EmployeeId = cmd1.EmployeeId ,
Group = "Sales" };
_bus.Send(cmd1,cmd2);
I would have to move the hilo generator into the client ui somehow,
detached from raven. It's easier to just get a new guid (done in the
constructor of HireEmployee).
Any better suggestion?
Thanks,
-Matt
On Mar 23, 12:02 am, "Oren Eini (Ayende Rahien)" <
aye...@ayende.com>
wrote: