I have set up a composite unique key on two columns of a mapping (see
below) but for some reason nHibernate still tries to insert records
which are duplicate rows.
I've looked around but there is very little in the way of help online.
Has anyone else got this working/not working?
public ProductUsageMap() {
WithTable("ProductUsage");
Id(x => x.Id).GeneratedBy.Identity().ColumnName("Id");
Map(x => x.ProductId).UniqueKey("Unique_ProductId_UsageTypeID");
Map(x => x.UsageTypeId).UniqueKey("Unique_ProductId_UsageTypeID");
Map(x => x.UsageStatusId);
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---