-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: NH Inheritance and Table per subclass
PostPosted: Sat Oct 28, 2006 6:56 pm 
Newbie

Joined: Sun Sep 10, 2006 12:27 pm
Posts: 13
Hi

A class named "B" inherit from a "A" class, i use the table per subclass strategy, so i have two table "A" and "B". "B" have a field "IdB" which is FK and PK to the "A" class.

How can i convert an instance of A in B? In sql is very simple, i add a new row in the "B" table and all is ok.....but in Nhibernate and my domain model?

Thank in advance
Giorgio


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 28, 2006 7:16 pm 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
You don't do the conversion.
Types doesn't change in NHibernate.
You will probably do this using SQL command and then loading the object, though


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 30, 2006 6:36 am 
Newbie

Joined: Sun Sep 10, 2006 12:27 pm
Posts: 13
Thank for yoru reply.... i will use a storeprocedure + trigger

Giorgio


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.