Actually, nevermind. Someone wasn't bright (me, about 5 years ago) and decided binary serializing objects with dangling relationships (which ended up being nh proxies) was a good idea.
Obviously this is a terrible mistake. I have resolved the issue by loading the entities in the old 1.2 version, and serializing them as json in a different column sans relationships. Then in the new version I have mapped the offending types using a JsonUserType I built. This usertype will ignore those relationships during serialization, as they aren't used in that particular context anyways. This permits my domain model to remain intact, the application logic itself unmodified, and everyone to chug along happily. So long as those relationships will never be needed this won't bite me in the rear later. Thanks for taking the time to read this, and I've responded to my own thread just in case someone does something as silly as I had. 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? > > On Saturday, July 21, 2012 11:45:08 AM UTC-4, TheCPUWizard wrote: >> >> 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:* [email protected] [mailto:[email protected]] *On >> Behalf Of *Chad Ruppert >> *Sent:* Saturday, July 21, 2012 10:10 AM >> *To:* [email protected] >> *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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> > -- 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/-/cD8lMuYbNM8J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
