NHibernate data visible in profiler but not written to DB
-
Hi, I've got an issue with NHibernate and it's causing me all sorts of headaches. I have a routine which takes an object and manipulates it into an appropriate state, then supposedly writes it to a database. What I'm seeing is that when I run SQL Profiler against the database, all the inserts and updates I'm expecting are present, but when I go to look at the database itself, the data has not been updated. Anyone ever experienced this? If I go back to Profiler and copy and paste the SQL into Enterprise Manager, then run it, everything happens as expected, the records are created/updated and everything looks fine. Profiler does not give any indication that anything went wrong with the transaction and I'm struggling to see what's going wrong. How can Profiler claim that the data has been written when it manifestly hasn't? If anyone's got any ideas I'd be really grateful.
-
Hi, I've got an issue with NHibernate and it's causing me all sorts of headaches. I have a routine which takes an object and manipulates it into an appropriate state, then supposedly writes it to a database. What I'm seeing is that when I run SQL Profiler against the database, all the inserts and updates I'm expecting are present, but when I go to look at the database itself, the data has not been updated. Anyone ever experienced this? If I go back to Profiler and copy and paste the SQL into Enterprise Manager, then run it, everything happens as expected, the records are created/updated and everything looks fine. Profiler does not give any indication that anything went wrong with the transaction and I'm struggling to see what's going wrong. How can Profiler claim that the data has been written when it manifestly hasn't? If anyone's got any ideas I'd be really grateful.
Ignore me. In fact, don't ignore me, let me serve as an instructional example. Don't forget that NHibernate is going to do some funky stuff with transactions, and if any of your database operations fail, chances are they're all going to fail. Furthermore, you probably won't get to know about it through conventional means either.
-
Ignore me. In fact, don't ignore me, let me serve as an instructional example. Don't forget that NHibernate is going to do some funky stuff with transactions, and if any of your database operations fail, chances are they're all going to fail. Furthermore, you probably won't get to know about it through conventional means either.
-
First class reply :) Is there an article about NHibernate gotchas lurking in your experiences? :-D
Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis
If I get to the end of this project with some hair remaining and my sanity intact then possibly :) I'm still having issues with this actually. Everything I see in SQL Profiler now runs fine if I copy it and run it manually, so I don't know where the rollback is coming from. I'm currently wondering if we can just give the users a fancy looking frontend and ask them to write all the important data down somewhere...