Hi Andrus,

is CREATE TABLE syntax (ENGINE=InnoDB) already implemented? I have mysql database server with MyISAM default (company policy), so Modeler and DbGenerator are not outputing fk sql statements. I tried beta1 with no success.

-Borut

On 7.3.2006 17:05, Andrus Adamchik wrote:

On Mar 7, 2006, at 7:03 PM, Andrus Adamchik wrote:

2. Here is a manual solution. If you are running DbGenerator from the code (not the Modeler), you can change the adapter back to "org.objectstyle.cayenne.dba.mysql.MySQLAdapter" and inside your code call "setSupportsFkConstraints(true)":

DbAdapter adapter = ...
((MySQLAdapter) adapter).setSupportsFkConstraints(true);

Hmm... on the other hand if the default is not InnoDB, we also need to change CREATE TABLE syntax to enforce InnoDB. I need to patch the adapter further.

Andrus


Reply via email to