ravendb/ravendb — pull request #553 by gareththackeray (2014-04-29 16:31:12+00:00)
Title: Use fixed "dummy id" rather than generating a new one each time

If you do

LoadByUniqueConstraint(arrayOfIds);

foreach(var id in arrayOfIds) {
LoadByUniqueConstraint(id);
}

You get a request for every Foo that does not exist. Using a Guid as the "id" in this case is a useful hack that avoids having to line up 2 arrays, but there is no need to generate a new Guid each time. Instead I've just hardcoded a fixed Guid and we'll use this every time.