-->
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.  [ 4 posts ] 
Author Message
 Post subject: Is it possible to have one HBM Map.file for Multiple tables?
PostPosted: Thu Sep 30, 2004 1:31 pm 
Hibernate version:2.1

Name and version of the database you are using:
Oracle DB - Version 9i

I'm quite new to Hibernate and still going through the documentations. Just wondering, Is anybody using hibernate for an application with 400+ tables. Could you please share your experience?

Also, Is it possible to use one mapping file for more than one table? So far the examples that I saw illustrated one mapping file for one table.
If this is possible could you please direct me to some documentation/example.

Thanks in advance.


Top
  
 
 Post subject:
PostPosted: Thu Sep 30, 2004 7:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
400+ tables - yes there are many (most of which can not talk about it) .

Yes you can have multiple table mappings in one hbm file.
Just give it a go.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 01, 2004 3:04 pm 
Hi David,

Thanks for your reply. Could you please direct me to some examples or documentation on how to go about implementing one hbm mapping file for multiple tables.

Thanks,
Sudhakar.J


Top
  
 
 Post subject:
PostPosted: Fri Oct 01, 2004 3:10 pm 
Expert
Expert

Joined: Thu Jan 29, 2004 2:31 am
Posts: 362
Location: Switzerland, Bern
Just have a look at the mapping DTD at http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd. For the class tag it says:
Code:
<!ELEMENT hibernate-mapping (meta*, import*, (class|subclass|joined-subclass)*, query*, sql-query*)>


Just do
Code:
<class ....>
   ...
</class>
<class ....>
   ...
</class>
<class ....>
   ...
</class>
....


HTH
Ernst


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