I am having a bit of confusion about the "Unique()" method that goes
with Fluent Mapping. For example ...

class Member
{
 virtual Guid Id { get; set; }
 virtual string Email { get; set; }
}

class MemberMap : ClassMap<Member>
{
 Key( k => k.Id );
 Map( k => k.Email ).Unique().Not.Null();
}

Not exact code - but I had assumed this would create Email as a Unique
Constraint. However it doesn't seem to change the outputed SQL at all
when I have it generate the SQL through the Configuration. Literally,
there is no difference in the table that it creates, and I haven't
found any information on this method. Can someone enlighten me?

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to