DevPinoy.org
A Filipino Developers Community

>>> First two to make 3 wins! <<<

NHibernate 1.2 is out

NHibernate 1.2 whose core functionality is support for generics is now available.  I immediately downloaded the binaries and test it out on my test project at work (for the first time). 

I did some modifications (basically changing from IList, ISet to their generics equivalents), then fire off my integration test suite which has my persistence tests.  I was greeted with the following exception:

NHibernate.InvalidProxyTypeException
Message: The following types may not be used as proxies:
ProjectTracker.Core.Customer: method get_ProjectList should be virtual
ProjectTracker.Core.Customer: method get_Id should be virtual
ProjectTracker.Core.Customer: method get_Name should be virtual
ProjectTracker.Core.Customer: method get_AccountNumber should be virtual
ProjectTracker.Core.Customer: method set_AccountNumber should be virtual
ProjectTracker.Core.Customer: method get_BindableProjectList should be virtual
ProjectTracker.Core.Customer: method set_ProjectList should be virtual
ProjectTracker.Core.Customer: method set_Id should be virtual
ProjectTracker.Core.Customer: method set_Name should be virtual

Turns out that they defaulted all classes and associations to lazy load, and being lazy loaded requires these interfaces to be virtual.  I just added the non lazy load settings to my mapping files and they are all green now.  Just check out the migration guide here.


Posted 05-04-2007 4:48 PM by jokiz
Filed under:

Comments

jager wrote re: NHibernate 1.2 is out
on 12-03-2007 11:59 AM

***! turning lazy-load off sucks. marking props as virtual sucks too!

Nico Granelli wrote re: NHibernate 1.2 is out
on 02-13-2008 4:25 PM

Thanks about that. I freak out when I saw that error message :)

asnaturalasgas wrote re: NHibernate 1.2 is out
on 06-24-2008 8:15 AM

thanks!!


Copyright DevPinoy 2005-2008