I have code that looks like this:
using (var session = this.sessionCreator.OpenSession())
using (var transaction = session.BeginTransaction())
{
session.SaveOrUpdate(anObject);
session.CreateSQLQuery(sql)
.ExecuteUpdate();
transaction.Commit();
}
Surprisingly, the SQL query executes before anObject is saved. Apparently, the ExecuteUpdatecommand does not participate in the current transaction. Is there any way to get the update to enlist in the transaction?
(Cross-posted from StackOverflow, where this had no responses.)
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.