-->
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.  [ 5 posts ] 
Author Message
 Post subject: inheritance mapping
PostPosted: Wed Oct 05, 2005 6:43 pm 
Beginner
Beginner

Joined: Thu Aug 04, 2005 8:41 pm
Posts: 47
Hello,

Why subclass is defined *WITHIN* a base class in hibernate mapping?
I really do not like it. I need to subclass from another class defined
in separate hbm.xml. I'm not supposed to modify that .hbm.xml
file cause it is shared across the applications and doesn't have to be
aware about my subclass.
The reason I need a subclass is that it needs to share same
fields of the base class plus it needs to define additional relationships
with objects in a different database schema which is specific for my
application.

What is the best way around this in hibernate?

Thanks a lot,
--MG


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 6:46 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
It doesn't have to be defined within. (Check the DTD)

_________________
nathan


Top
 Profile  
 
 Post subject: inheritance mapping
PostPosted: Wed Oct 05, 2005 6:51 pm 
Beginner
Beginner

Joined: Thu Aug 04, 2005 8:41 pm
Posts: 47
This is a good news for me
How do I tell a subclass what its superclass is? Thanks a lot.

--MG


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 7:02 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
It has an extends attribute.

_________________
nathan


Top
 Profile  
 
 Post subject: inheritance mapping
PostPosted: Wed Oct 05, 2005 8:03 pm 
Beginner
Beginner

Joined: Thu Aug 04, 2005 8:41 pm
Posts: 47
Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.