Howdy from a newbie,
I've been trying to generate the mapping files and classes using reverse engineering, but to no avail.
Here are the two tables I created for the sake of understanding the problem:
Code:
CREATE TABLE `def` (
`def_id` int(5) NOT NULL auto_increment,
`abc_id` int(5) NOT NULL default '0',
PRIMARY KEY (`def_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
Code:
CREATE TABLE `abc` (
`abc_id` int(5) NOT NULL auto_increment,
PRIMARY KEY (`abc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
I was expecting the reverse engineering tool to produce a one-to-many relationship using the FK
abc_id in
def, with a
set element in the
def.hbm.xml, but none of this happenened.
What am I doing wrong?
Thanks for your time and help.