-->
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.  [ 2 posts ] 
Author Message
 Post subject: Inheritance Mapping
PostPosted: Wed Jul 21, 2004 9:00 pm 
Beginner
Beginner

Joined: Wed Jul 21, 2004 8:12 pm
Posts: 35
Hello Everyone:

I am new to Hibernate so I apologize if my questions seem very basic. I am using "A table-per-subclass mapping" and I was wondering if someone can help me with my problem. Let's say I have class "Billing" and two subclasses "BackCard" and "CreditCard". This translates to 3 tables at the database level. Now my question is:

Under what name I should save the xml configuration file? should it be Billing.hbm.xml (the name of superclass)?

Should I provide any xml configuration file for the subclasses despite the fact I have declared them in the original config file within <joined-subclass> tags ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 22, 2004 10:41 am 
Beginner
Beginner

Joined: Tue Jun 29, 2004 3:44 pm
Posts: 43
I would call it Billing.hbm.xml. I think you can call it whatever you want to if you're willing to load it into the configuration manually. But it will be found automatically if the name matches the class name.

If the sub-classes are described in that file, don't create other files. If you want, you can describe the sub-classes in separate files, but I'm sure you'd run into problems if you map them in more than one place.


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