Jose, As best I can tell, yes I do know what I am doing. :)
As explained above, the code here is a simplified example of a much deeper call stack. I have consolidated all the code that is actually executing into one function for testing on my part and intelligibility on the part of the reader. In the the real code base, the code that binds and unbinds the session, as well as the code that opens and closes the transaction is generic. It is executed in many scenarios not just this one. Yes, I can make the above code work by eliminating binding and unbinding of the session but in the real code base, doing so is not desirable. As for the sequence of flush and commit, we are not getting to that point. The exception occurs immediately upon calling Session.Save. All, What I have figured out so far is that, the SqlCommand instance that contains the insert statement is being invoked with ExecuteReader (because we are using natively generated Ids) and it is this command that does not have the needed transaction associated with it, per the exception message. --Ken -- 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.
