I have a problem. Whenever I add a mapping with .CustomTypeIs(typeof
(int)), NHiberate thinks my object is dirty and try to update the
object for me. ...
This is causing performance problem since FindAll call will cause
massive update statements ....
The reason I use .CustomTypeIs(typeof(int)) is that I want my enum to
map to integer ...
My mapping is like the following, whenever I uncommnet the last row
(Map(x => x.ContractType).CustomTypeIs(typeof(int));) I didn't get
the extra update statement. ....
public ClientMap()
{
Id(x => x.ID, "ClientID").GeneratedBy.GuidComb();
Version(x => x.Version).SetAttribute("unsaved-value",
"-1");
Map(x => x.LastUpdatedDateTime);
Map(x => x.LastUpdatedUser);
Map(x => x.CreatedDateTime);
Map(x => x.CreatedUser);
Map(x => x.SharePointID);
Map(x => x.BMC_ID);
Map(x => x.ClientName);
Map(x => x.CompanyFullName);
Map(x => x.AlternativeNames);
Map(x => x.Acronym);
HasMany(x => x._CompanyAddress).Cascade.AllDeleteOrphan();
Map(x => x.RenewalMonth);
Map(x => x.Platform);
Map(x => x.IsActive);
Map(x => x.IsCareFirstConnectClient);
Map(x => x.InfoBoxEmail);
HasMany(x =>
x._ClientRoleAssignments).Cascade.AllDeleteOrphan();
HasMany(x => x._ClientContacts).Cascade.AllDeleteOrphan();
Map(x => x.ContractType).CustomTypeIs(typeof(int));
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---