hello, i am running the same problem of whoami's, when try to update a table with a guid as primary key ( id ).
here is my save button code
ISession session = NHibernateHttpModule.CurrentSession;
ITransaction transaction = session.BeginTransaction();
ProfileTbl profile;
if (isNew)
{ profile = new ProfileTbl();
}
else
{
profile = (ProfileTbl)session.Load(typeof(ProfileTbl), companyId);
}
profile.CompanyName = txtName.Text;
profile.Phone1 = txtPhone1.Text;
profile.Phone2 = txtPhone2.Text;
profile.Fax = txtFax.Text;
profile.Address1 = txtAddress1.Text;
profile.Address2 = txtAddress2.Text;
profile.City = TxtCity.Text;
profile.State = txtState.Text;
profile.Zip = txtZip.Text;
profile.ShowItemCost = chkItemCost.Checked;
profile.ShowOutstandingBalance = chkOutstandingBalance.Checked;
profile.PrintSignature = chkPrintSignature.Checked;
session.SaveorUpdate(profile);
}
session.Flush();
transaction.Commit();
session.Close();
session.Dispose();
The insert works but the update does nothing, also in the log file, i see this long set of entries, but dont see any helpful
16:46:10 [8] DEBUG NHibernate.Impl.Printer - listing entities:
16:46:10 [8] DEBUG NHibernate.Impl.Printer - listing entities:
16:46:10 [8] DEBUG NHibernate.Impl.Printer - DataLayer.DataClases.ProfileTbl{State=, Phone1= , Address1=, Phone2= , Zip=, CloseJobStatus=null, PrintSignature=False, Fax= , City=, CompanyId=ce66ec3b-d381-4618-b474-41035c2c5eb9, Address2=, ShowItemCost=False, ShowOutstandingBalance=False, CompanyName=otra empresa}
16:46:10 [8] DEBUG NHibernate.Impl.Printer - DataLayer.DataClases.ProfileTbl{State=, Phone1= , Address1=, Phone2= , Zip=, CloseJobStatus=null, PrintSignature=False, Fax= , City=, CompanyId=ce66ec3b-d381-4618-b474-41035c2c5eb9, Address2=, ShowItemCost=False, ShowOutstandingBalance=False, CompanyName=otra empresa}
16:46:10 [8] DEBUG NHibernate.Impl.Printer - DataLayer.DataClases.ProfileTbl{State=, Phone1= , Address1=, Phone2= , Zip=, CloseJobStatus=null, PrintSignature=True, Fax= , City=, CompanyId=a97441fb-3e87-4dce-be45-6757cb65b81f, Address2=, ShowItemCost=False, ShowOutstandingBalance=True, CompanyName=uno dos tres cuatro}
16:46:10 [8] DEBUG NHibernate.Impl.Printer - DataLayer.DataClases.ProfileTbl{State=, Phone1= , Address1=, Phone2= , Zip=, CloseJobStatus=null, PrintSignature=True, Fax= , City=, CompanyId=a97441fb-3e87-4dce-be45-6757cb65b81f, Address2=, ShowItemCost=False, ShowOutstandingBalance=True, CompanyName=uno dos tres cuatro}
16:46:10 [8] DEBUG NHibernate.Impl.Printer - DataLayer.DataClases.ProfileTbl{State=, Phone1= , Address1=, Phone2= , Zip=, CloseJobStatus=null, PrintSignature=False, Fax= , City=, CompanyId=40e75238-3485-4ded-977a-5f00d651c057, Address2=, ShowItemCost=False, ShowOutstandingBalance=False, CompanyName=tres cuatro cinco}
16:46:10 [8] DEBUG NHibernate.Impl.Printer - DataLayer.DataClases.ProfileTbl{State=, Phone1= , Address1=, Phone2= , Zip=, CloseJobStatus=null, PrintSignature=False, Fax= , City=, CompanyId=40e75238-3485-4ded-977a-5f00d651c057, Address2=, ShowItemCost=False, ShowOutstandingBalance=False, CompanyName=tres cuatro cinco}
16:46:10 [8] DEBUG NHibernate.Impl.Printer - DataLayer.DataClases.ProfileTbl{State=, Phone1=813.240.7772, Address1=P.O. Box 549, Phone2=, Zip=, CloseJobStatus=Closed, PrintSignature=False, Fax=813.671.5562, City=http://www.savageconsulting.net, CompanyId=836fa1b6-1190-4005-b434-7ed921be2026, Address2=Riverview, Fl. 33568, ShowItemCost=True, ShowOutstandingBalance=False, CompanyName=Savage Consulting, Inc.}
16:46:10 [8] DEBUG NHibernate.Impl.Printer - DataLayer.DataClases.ProfileTbl{State=, Phone1=813.240.7772, Address1=P.O. Box 549, Phone2=, Zip=, CloseJobStatus=Closed, PrintSignature=False, Fax=813.671.5562, City=http://www.savageconsulting.net, CompanyId=836fa1b6-1190-4005-b434-7ed921be2026, Address2=Riverview, Fl. 33568, ShowItemCost=True, ShowOutstandingBalance=False, CompanyName=Savage Consulting, Inc.}
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - executing flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - executing flush
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush begin
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush begin
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush end
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush end
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - aggressively releasing database connection
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - aggressively releasing database connection
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - post flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - post flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - closing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - closing session
16:46:10 [8] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)
16:46:10 [8] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - opened session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - opened session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - flushing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - flushing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - executing flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - executing flush
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush begin
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush begin
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush end
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush end
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - aggressively releasing database connection
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - aggressively releasing database connection
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - post flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - post flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - closing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - closing session
16:46:10 [8] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)
16:46:10 [8] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - opened session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - opened session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - flushing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - flushing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - executing flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - executing flush
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush begin
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush begin
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush end
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush end
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - aggressively releasing database connection
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - aggressively releasing database connection
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - post flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - post flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - closing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - closing session
16:46:10 [8] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)
16:46:10 [8] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - opened session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - opened session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - flushing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - flushing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - executing flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - executing flush
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush begin
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush begin
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush end
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - registering flush end
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - aggressively releasing database connection
16:46:10 [8] DEBUG NHibernate.Impl.ConnectionManager - aggressively releasing database connection
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - post flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - post flush
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - closing session
16:46:10 [8] DEBUG NHibernate.Impl.SessionImpl - closing session
16:46:10 [8] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)
16:46:10 [8] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)
Thanks in advance
|