-->
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: Joined-Subclass on other XML file
PostPosted: Fri Jan 23, 2004 3:43 pm 
Newbie

Joined: Fri Jan 23, 2004 3:37 pm
Posts: 14
Hi!
I have the following problem:
There is a project with some persistent classes (and their XXX.hbm.xml descriptors), wich are used by various other projects.
That main project has a class (ie, Person) wich is general. One of the other projects has a specific class (ie, Customer), that does not belong to that general project.
I cannot map the joined-subclass on the Person.hbm.xml because the Customer class does not belongs to that domain.
How can I map a joined-subclass in a different XML than the superclass?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2004 5:18 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
I think there is the possiblitiy to use the "extends" attribute somehow, but I don't know if this works the same way as joined-subclass ...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2004 5:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Same as subclasses, I guess
http://www.hibernate.org/hib_docs/reference/html_single/#or-mapping-s5

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2004 5:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Ah great, you can do just the same with joined-subclass, too:
Quote:
It is possible to define subclass and joined-subclass mappings in seperate mapping documents, directly beneath hibernate-mapping.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 26, 2004 12:10 pm 
Newbie

Joined: Fri Jan 23, 2004 3:37 pm
Posts: 14
Thanks, guys. I've started using Hibernate on version 1.1.X and didn't noticed that possibility....

Sorry for not reading the documentation so deep...


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.