(1) When we were developing the SSH project, we found that we could not generate the primary foreign key relationship of one-to-one one-to-many and so on using MyEclipse's own Hibernate reverse engineering tool. Obviously the database has been built with the primary foreign key relationship. Why not when the reverse generation?
(2) First of all, I am using the PHP development environment appserv own MySQL database, not installed separately;
(3) This is because of problems with the database engine,
We can enter commands on the SQL command line: show engines;
You can see that default defaults to MyISAM;
(3) "MyISAM database engine does not support transactional processing and does not support foreign keys" We should change to the InnoDB type database engine;
(4) There are two ways to modify the database engine, one is to use the command ALTER TABLE name TYPE=INNODB; To modify, but I did not try to succeed;
The second is to find the My.ini file in the profile summary, a look to understand the comments removed, restart the database is very good
(5) But one of the mistakes in this way is that the server will not start!
Hinernate the reverse engineering of MySQL database cannot generate a primary foreign key relationship