-->
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: How to extend a base class wich has no table???
PostPosted: Thu Oct 07, 2004 5:10 am 
Newbie

Joined: Fri Mar 26, 2004 7:23 am
Posts: 19
Dear all,


We have many classes that are represented in the DB.And each of these classes extends a Base class.The existing application uses struts & spring. Now the problem is we are new to Hibernate and wish to include hibernate into this application.

So we wish to extend this base class(-this class contains 4 variables which are common to all the classes that extend it and the Base class doesn't form a table by itself.

But we are not sure how to specify the same in the XML file...

so that we get the resultant java code as....

public someclass extends baseclass{
...
...
...

}

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 07, 2004 6:10 am 
Beginner
Beginner

Joined: Mon Aug 16, 2004 6:09 am
Posts: 46
Location: Geneva, Switzerland
Do you mean file produced by hbm2java? Just add to your .hbm.xml :

Code:
        <meta attribute="extends">BaseClass</meta>



Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 07, 2004 6:25 am 
Newbie

Joined: Fri Mar 26, 2004 7:23 am
Posts: 19
Thank you

It worked...

Cheers!!!!


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.