Thanks for the replys. I also though that returning "true" from either method told NHibernate not to insert this particular object. What I found, however, was that if I returned true in the OnPreInsert method, I got the error:
Unexpected row count: 0, expected: 1 >From debug, it looks like NHibernate does not execute an INSERT if "true" is returned for an object, but the above error is thrown at the end of processing all the objects. Not sure why this is happening but it seems apparent that by returning "true", some array count is not correct anymore. Because the error is thrown, a rollback is done and nothing gets saved. And when I returned true on the OnSave method, NHibernate still saved the object to the database. So, in the end I am not sure why it isn't behaving as I expected. Any new thoughts? Thanks - Peter -- 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.
