If I’m reading the log correctly, it looks to me as if the transaction is 
disposing without a commit so it’s effectively rolling back the transaction. 
Search through the log for AdoTransaction and you’ll see this general pattern 
for the first two or three batches and for the last few batches (summarized for 
brevity):

10:20:39 DEBUG AdoTransaction: 0 – Begin (Unspecified)
10:20:39 DEBUG AdoTransaction:0 – Start Commit
10:20:39 DEBUG AdoTransaction:0 – IDbTransaction Committed
10:20:39 DEBUG AdoTransaction:0 – IDbTransaction disposed

This is more or less what I would expect to see when committing an transaction. 
Looking at the log entries in which the 25 or so records are inserted into the 
database, I see this:

10:20:38 DEBUG AdoTransaction:0 – Begin (Unspecified)
10:20:38 DEBUG AdoTransaction:0 – Start Commit
~ 25 insert statements with identity columns
10:20:39 DEBUG AdoTransaction:0 – IDbTransaction disposed
10:20:39 DEBUG SessionImpl:0 – transaction completion

What I don’t see is any indication that IDbTransaction committed.

From: Rod Howarth 
Sent: Sunday, July 03, 2011 8:49 PM
To: [email protected] 
Subject: [nhusers] NHibernate not working for .asmx web service, doesn't save 
the edits to the actual database?

I've asked this question on SO: 
http://stackoverflow.com/questions/6531640/nhibernate-sql-queries-not-actually-taking-effect-on-the-database
 but I'm not having too much luck so I thought I'd ask here.

Is there any reason why my NHibernate creations would be working well for .aspx 
pages, but not in a web service call? Here is a debug output: 
http://pastebin.com/mEYWiCsF - I don't really know how to read the logs well, 
but from what I can tell, it is working fine? The SQL queries look correct? 

Anyone got any advice on how I could debug this? 
-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/lLWSfBCJEsMJ.
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/nhusers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to