GarrettD78 wrote:
I am using SQL Server 2000. Originally there was not going to be any changing of vehicle object types, since a truck is always a truck. I never thought about them putting the vehicles in as the wrong type and wanting to change the type.
So are you saying that I should create a stored procedure to create the row in the Pickup table instead of trying to use hibernate to get the change made?
I'm throwing that out there as a possibility. There are multiple ways of doing it, I'm sure; I'm just suggesting one that will hurt the least, IMHO. Sergey, or others that are more well versed in NHibernate may know something I don't. If I were skinning this particular cat, I'd make a SP in the DB and let it handle it at the lowest level possible, rather than drag NHibernate into it. (Since it looks to be a one time change -- once you change them over to a Pickup, you can simply add the new subclass and tweak the mappings to the new objects, yes?)