I made a Java EE application and I specified that the database should be of myISAM storage engine:
<properties>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLMyISAMDialect" />
</properties>
When I run my application with this configuration, no table is created in the Database. But when I use the following code:
<properties>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" />
</properties>
..The application creates tables, but they're in innoDB storage. But I'd like it to be in myISAM, because if I keep the current configuration, this error is generated when I want to make transactions with the database.
#1452 - cannot add or update a child row a foreign key constraint fails
I'm using Hibernate 4.2.1 and MySQL v 5.5.34
I used the solution on this link,
<properties>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.dialect" value="mypackage.MySQL5MyISAMDialect" />
</properties>
but it didn't help because when I want to use it, I get an error telling me that the class mypackage.MySQL5MyISAMDialect
wasn't found.