Hi
I have a table with a primary key (auto-increment) and a field 'social security number'. This social security number is unique. In the database, this field is marked up as an UNIQUE INDEX.
When I try to persist an object with the same social security number, NHibernate throws the underlying unique constraint that SQL generated. I've implemented the Equals() and GetHashCode()-method on my business entity, but I'm not sure if this is correctly.
Can someone point me in the right direction what I'm missing here? Thx!
|