karlchu wrote:
I guess the only suggestion I would have at this point is to dig all the way into the inner exceptions. I did have some issues with Spring.NET burying the NHibernate exception. Sorry that I wasn't of much help.
No problem...I'm not really worried about the exception that is being thrown because the UnresolvableObjectException that is being thrown makes complete sense...it is thrown because before the call to SaveOrUpdate, the Asset that was passed has a Uid value of 0, which matches the unsaved-value in the mapping file. The SaveOrUpdate method inserts a record into the database without a problem and the UID value in the database is incremented correctly. For instance, the last time I ran the test, it inserted a row with a UID value of 713. However, after the call to SaveOrUpdate, the object's Uid value is set to 1. So, when the refresh method is called, it is looking for a row with a UID value of 1, which it does not find...that's why the Exception is thrown. I'm just wondering why the SaveOrUpdate call doesn't update the Asset's Uid value to 713. Why does it always set it to 1?