Thoughts from Dan Miser RSS 2.0
 Tuesday, March 10, 2009

Yesterday, I had to upgrade from Spring.NET 1.1 to Spring.NET 1.2 in order to use Quartz.NET. After doing that, I started to get InvalidCastException errors in my unit tests that told me I couldn't convert an int to a Nullable<int>. Things like this were broken:


void TestMe(int? id) 
{ 
  // do testing here
}

// and elsewhere, we call it like this
TestMe(42);

Very strange. It turns out that this is a known (and fixed) issue due to using Nullable types through AOP. I grabbed the latest nightly build and all of the tests passed again.

However, when running, I found a breaking change in the post-1.2.0 code that I needed to correct, namely:

Overriding the SessionFactoryObjectName in web.config no longer uses Spring.Data.NHibernate.Support.OpenSessionInViewModule.SessionFactoryObjectName as the key. Now, you need to use Spring.Data.NHibernate.Support.SessionScope.SessionFactoryObjectName. e.g.

<add key="Spring.Data.NHibernate.Support.SessionScope.SessionFactoryObjectName" 
  value="NHibernateSessionFactory" /> 

Now everything is upgraded and working again.

Tuesday, March 10, 2009 1:02:30 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
.NET | ALT.NET
Navigation
Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Dan Miser
Sign In
Statistics
Total Posts: 338
This Year: 4
This Month: 0
This Week: 0
Comments: 613
All Content © 2010, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)