I'm creating a blog library using nHibernate and I have a BlogEntry class that has a CreatedBy property of type User (User is an abstract class). The two concrete implementations of the User class are RegisteredUser and UnknownUser. I'd like nHibernate to instantiate UnknownUser class if the value in the CreatedBy field is null. If it is not null I'd like it to instantiate RegisteredUser.
Is this possible with nHibernate? and what should my mapping file look like if it is?