How do you change an object from one type to another? /Oskar
2009/6/22 Anatoly <[email protected]>: > > I have a superclass (called Question) with two subclasses > (QuestionType1 and QuestionType2). Every subclass has its own > attributes. In the UI of my application it is possible to change > Question type from type1 to type2. So, I save an entity of the type1. > Than I retrieve this entity with NHibernate to edit it in the UI. I > change the type to type2 and fill in the appropriate attributes of > this type. When I save it (ISession.SaveOrUpdate), it updates all the > values except for the discriminator-value. How can I let NHibernate > update the discriminator? > I've debugged my application with a profiler and saw that > discriminator-value does not exist in the UPDATE query. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. 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 -~----------~----~----~----~------~----~------~--~---
