-->
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: mapping of tables in maaping file
PostPosted: Thu Dec 10, 2009 6:35 am 
Newbie

Joined: Thu Dec 10, 2009 5:37 am
Posts: 3
Hi !
As i m new to hibernate and the community, i want to know how to map more than one database table and bean object in hibernate mapping file. If anyone knows than plz tell me.

thanks in advance


Top
 Profile  
 
 Post subject: Re: mapping of tables in maaping file
PostPosted: Fri Dec 11, 2009 5:58 pm 
Newbie

Joined: Fri Dec 11, 2009 4:16 pm
Posts: 3
Within your hibernate.cfg.xml you can simply add multiple mapping classes. like so...
<hibernate-configuration>

<session-factory name="java:/hibernate/SessionFactory">

....

<mapping class="com.xxx.yyy.zzz.A"/>
<mapping class="com.xxx.yyy.zzz.B"/>

</session-factory>

</hibernate-configuration>


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.