I have a Windows XP product key on my PC, but I'm not sure which release of Windows XP it belongs to SP1, SP2, or SP3.

Is there a way I can tell without trying each one?

Note: 
In this case, I have an old PC which had an OEM XP Pro license. I don't have the media for it any more. However, I do have a media for XP Pro (off the shelf non-OEM). 

The Product Key on the case doesn't want to validate. So I'm presuming that there is something encoded in it as to the release it works with. I can get media, I just don't want to try each one.


Question: unique in .hbm.xml file not raising exception
Answer: The unique attribute is only used when generating a DDL schema from a mapping (hbm).

If you want to check uniqueness with NHibernate, it is data validation and you should look NHibernate validator.
And as Rafael said you have to write your own validator.

You can also check the natural-id element.

Unless you absolutely need to validate uniqueness on application side, this sample and this one make me think it may be better to let the database do this job.