-->
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: many-to-many mapping using Hibernate 2.1.2/xdoclet 1.2 ??
PostPosted: Wed Jun 02, 2004 1:03 am 
Newbie

Joined: Wed Jun 02, 2004 12:49 am
Posts: 1
I use hibernate 2.1.2 and XDOCLET 1.2.

TWO classes/tables have many-to-many relationships:

TERMINAL: id - primary key
other columns;

PROGRAM: id - primary key
other columns;

TERMINAL can have many programs linked to it and PROGRAMS could belong to more then one TERMINAL;

I guess we need linking table, something like:
TERMINAL-PROGRAM with two foreign keys:
program_id
terminal_id

Could you give me an example on how to use XDOCLET hibernate tags to generate model.hbm.xml file for the above scenario?
Also I am guessing the many-to-many collection would be involved, or wouldn't?

Thank you in advance
Very newbie to Hibernate

Yulia


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 5:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The XDoclet tags for the this is not much different from the hibernate mapping so you can look on the XDoclet site and with youe knowledge of hibernate's mapping format work it out - maybe a bit of trial and error.

Ther are a number of examples in the example section for using XDoclet so they might be worth investigating.


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.