Ho to cast an object in DB to its inherited type?

Lets say I have 2 classes.

public class Animal { }

public class Dog : Animal { }

Step 1:
Create an instance of Animal and save it into the DB in NHibernate.

Step 2:
Call the created instance of Animal and take its ID and insert a new
instance of Dog in the database with the ID of Animal instance. So now the
previously inserted Animal will now be Dog in the database.


Any idea how to do this?

-- 
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.

Reply via email to