SOLUTIONS FOR THE PROBLEMS WITH THIS TUTORIAL,
October 17, 2008 at 10:24 PM
hi
At first you will have to change your hibernate.cfg.xml to indicate which username and password and port will be used to establish the connection.
Then you can create a database named hibernatetutorial (the hibernate won´t do it for you in this case)
Then you have to create a table named contact whose id column is auto increment. The fucking hibernate does not create the database as mentioned above and in adittion it creates a table contact without auto increment ID) If you let hibernate create the table your app will run fine but will not insert any record into table.
Here is the create statement CREATE TABLE `Contact` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `firstName` VARCHAR( 50 ) NOT NULL , `lastName` VARCHAR( 250 ) NOT NULL , `email` VARCHAR( 100 ) NOT NULL , PRIMARY KEY ( `id` ) ) TYPE = MYISAM ;