This is such a simple thing, but I am trying to use the Hibernate Reverse Engineering tools to generate a one-to-one mapping from a mysql table structure, but instead a one-to-many mapping is generated instead. My mysql ddl is the following:
| CREATE TABLE Guest ( | id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, | firstName VARCHAR(45) NULL, | lastName VARCHAR(45) NULL, | lastLogin DATETIME NULL, | PRIMARY KEY(id) | ) | TYPE=InnoDB; | | CREATE TABLE Tracking ( | Guest_id INTEGER UNSIGNED NOT NULL, | login DATETIME NULL, | PRIMARY KEY(Guest_id), | UNIQUE INDEX Tracking_FKIndex1(Guest_id), | FOREIGN KEY(Guest_id) | REFERENCES Guest(id) | ) | TYPE=InnoDB; | | The ddl is generated using a tool (DBDesigner4) but it looks correct to me. I want a one-to-one association between Guest and Tracking entities. Can someone spot what I'm doing wrong, or at least suggest an alternative strategy, please. Thanks in advance... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161716#4161716 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161716 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
