I've got a weird one here. I'm using nhibernate and my problem is that on larger data inserts no exceptions are thrown, there is no data in the table, BUT the identity keys are taken up. So when I manually insert the next record the identity key skips a few as if the data was imported and deleted?!?!
Here are some things to consider: - I'm fetching data from a web service so each item takes a while before it gets called the make persistent - Depending on the item it is either an insert or an update - I'm using a foreach to iterate through the fetched collection before checking to see if it's update or insert (ie. I try to populate an entity or create new instance and then call make persistent at the end.) - the code works as data does get inserted on smaller batches and is visible in the database. For imports that takes slightly longer then it still complete without any exceptions but there is no data visible but only clue is the identity key has been taken up by what would have been inserted and visible.
Can anyone explain what is going on here? As I'm not getting any exceptions I have no way to diagnose this, any help or suggestion much appreciated!