I have a Users table, where the ID field is a GUID field.
Using ASPNET, I create a user account and return a GUID. I am trying to create related records in my tables with this GUID as the primary identifier.
The problem I am facing is that when I manually install User.ID NHibernate tries to update rather than paste. I see this with NHibernate Profiler before it launches "Unexpected row count: 0; Expected: 1".
My UsersMap for the Users table looks like this:
public class UsersMap : ClassMap<Users> { public UsersMap() { Id(x => x.ID, "ID");
Any ideas? Thanks in advance.
fluent-nhibernate- nhibernate-mapping
Michael D. Kirkpatrick
source share