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
|