We have also integrated a UniqueValidator from the validation module into our ORM module. It is mapped into WireBox as UniqueValidator@cborm so you can use in your model constraints like so:
That's it! Once you define a property with this validator, then cbValidation will delegate to the cborm UniqueValidator so it can identify if the value is unique in the database. Below you can see an example entity that marks the userName property as unique for validation purposes.