Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:2.1.8
Hibernate extensions version:2.1.3
MySQL Version: 4.0.20
mysql-connector-java version:3.1.7
middlegen version:2.1
I can't get middlegen to create a one-to-one relationship from a mysql database.
My most recent attempt uses these create statements:
Code:
CREATE TABLE boat (
id VARCHAR(128) NOT NULL,
name VARCHAR(128) NULL,
PRIMARY KEY(id)
)
TYPE=InnoDB;
CREATE TABLE anchor (
boat_id VARCHAR(128) NOT NULL,
name VARCHAR(128) NULL,
UNIQUE INDEX anchor_FKIndex1(boat_id),
FOREIGN KEY(boat_id)
REFERENCES boat(id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
TYPE=InnoDB;
Middlegen shows the relation as one-to-many (a boat can have many anchors). What do these create statements need to look like?
Any help is greatly appreciated.
TIA
Mike