Value based implementation of nhibernate class
I am creating a blog library using nHibernate and I have a BlogEntry class that has a CreateBy property of type User (User is an abstract class). Two concrete implementations of the User class: RegisteredUser and UnknownUser . I would like to create an instance of nHibernate UnknownUser , if the value in the "Created" is null. If it is not null, I would like to create an instance of RegisteredUser .
Is this possible with nHibernate? and what should the mapping file look like, if any?
+1
source to share