Or to put it another way, NHib simply doesn't support using class inheritance in the way you'd like it to. You may want to consider the State pattern to get your Question object exhibiting different behaviour based on the value of a property - I've certainly found it useful.
Cheers, John On Jun 22, 3:55 pm, Jason Meckley <[email protected]> wrote: > I think what Oskar is getting at is how can you change X to Y. here is > an analogy: > You need to buy an automobile (Question) > You decide to buy a car (Type1). You the next day you want the car to > become a truck (Type2). > You cannot. To get a truck you need to buy a new automobile. > > In you scenario "changing" type 1 to type 2 would require: > creating a new type 2 > associating all type 1's children (Answers?) to type 2 > deleting type 1. > > On Jun 22, 10:32 am, Anatoly <[email protected]> wrote: > > > > > I use Data Tranlator Pattern (DTO) and Entity Translator pattern to > > translate object from the client side to the entity on the server side > > of the application. > > I use combo box to change type in the UI. Then I send this value in a > > DTO object to the server side. Using value from the combo box server > > determines which object type it has to create.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
