|
If you use MySQL... Modeler does not support MySQL FK statements (ADD FOREIGN KEY (foo_fk) REFERENCES foo (oid)) You have to generate database tables through API with generator.runGenerator(dataSource) You have to to use MySQLAdapter mysqlDbAdapter = new MySQLAdapter(); and not AutoAdapter then mysqlDbAdapter.setSupportsFkConstraints(true); generator = new DbGenerator(mysqlDbAdapter, dataMap); generator.setShouldCreatePKSupport(true); generator.setShouldCreateFKConstraints(true); generator.setShouldDropTables(false); then try { generator.runGenerator(dataSource); } catch (Exception e) { logger.error("Error running database generator for " + dataMap.getName(), e); } I hope this will get you started, Borut On 31.7.2006 0:04, raggeler wrote: Hi all |
- Mysql InnoDB and ForeignKeys raggeler
- Re: Mysql InnoDB and ForeignKeys Borut Bolčina
- Re: Mysql InnoDB and ForeignKeys Andrus Adamchik
