Did NHibernate generate the database schema for you? Because even though you set the property as unique, if the schema does not have the unique constraint, it will do nothing. Basically, that property won't query the database looking for uniqueness; it will only set the SQL constraint on insert.

unique in .hbm.xml file not raising exception
Is it possible to use common principal components for assessing covariance matrix similarity in R?

This approach was championed by Flurry, 1988 but this paper is what I have in mind.  

References


Flury B (1988) Common principal components and related multivariate models. Wiley, New York 

