RE: [nhusers] nh1.2 to 2.1 upgrade with old data and types mapped with type="serializable" throwing serialization exceptions

33 views
Skip to first unread message

TheCPUWizard

unread,
Jul 21, 2012, 11:45:08 AM7/21/12
to nhu...@googlegroups.com

Have you considered keeping the legacy code in its own AppDomain? I have used this for many upgrade (not just nH) scenarios, and it works quite nicely.

 

From: nhu...@googlegroups.com [mailto:nhu...@googlegroups.com] On Behalf Of Chad Ruppert
Sent: Saturday, July 21, 2012 10:10 AM
To: nhu...@googlegroups.com
Subject: [nhusers] nh1.2 to 2.1 upgrade with old data and types mapped with type="serializable" throwing serialization exceptions

 

I have been dealing with legacy code written in NHib 1.2, and have wanted to upgrade it to at least 2.1 running on .net 4.0. Everything has gone quite swimmingly, except for types mapped as type="serializable" with the sql type of image on Sql Server 2k.

 

This has been a MAJOR issue, in that it throws serialization exceptions when trying to load entities that contain said mapping. The inner exception complains about not being able to find the 1.2 version of the NHib assembly. I have tried everything from assembly redirects to attempting to load both versions of the assembly. (redirects are ignored, and the dual loading caused type confusion). 

 

I am quite frankly losing hope here, and am beginning to believe that it just won't happen without doing some terrible, terrible things. Can you think of anything that might be done?

--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/zXx7rLNM95UJ.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.

Jason Meckley

unread,
Jul 24, 2012, 8:14:09 AM7/24/12
to nhu...@googlegroups.com
create an IUserType to handle the mapping between the Image object and the database schema.

On Monday, July 23, 2012 8:25:49 PM UTC-4, Chad Ruppert wrote:
Not sure if that's going to work. Are there any other options?

To unsubscribe from this group, send email to nhusers+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages