ravendb/ravendb — pull request #541 by ChadBoschert (2013-12-04 17:47:11+00:00)
Title: Multi-tenant Unique Constraint Enhancements

I've updated the client-side Unique Constraints bundle to satisfy the following need that our application has:
- Tenant-specific unique constraint configuration (via metadata) when application has one DocumentStore instance per tenant/database
- Runtime constraint caching must be per DocumentStore, not statically per application
- Constraints can be defined in the tenant database (metadata), not only statically via UniqueConstraintsAttribute

Additionally, I added the following enhancements to the extension methods:
- Support for loading multiple documents in a single call, by providing multiple values
- Support for specifying property name as a string instead of lambda expression (simplifies loads when constraints are not defined statically)

Finally, I think I've maintained backwards compatibility both from a functionality and API perspective. Applications that wish to take advantage of these enhancements simply need to provide a custom implementation of UniqueConstraintsTypeDictionary when registering their document store listener.

```C#
documentStore.RegisterListener(
new UniqueConstraintsStoreListener(
new CustomUniqueConstraintsTypeDictionary()));
```