Sorry for that. I will file a JIRA issue. Thanks. 2008/5/8 Andrus Adamchik <[EMAIL PROTECTED]>:
> Hi Borut, > > On May 8, 2008, at 8:55 AM, Borut Bolčina wrote: > > > Andrus, > > > > Please don't ignore that there are a lot people on this list with large > combined Cayenne knowledge, not just me. So that's not a one-on-one > conversation. > > > > If I am using AutoAdapter and DbGenerator for table creation with MySQL 5 > > and table_type variable in MySQL is set to MyISAM, then according to > > > > http://cayenne.apache.org/doc/api/org/apache/cayenne/dba/mysql/MySQLAdapter.htmlI > > thought the CREATE TABLE string when the generator is run would cause > > the > > engine to be MyISAM or whatever the table_type is set to, but it gives > > me > > InnoDB: > > > > INFO [28 Apr 2008 11:14:57.877] Detected and installed adapter: > > org.apache.cayenne.dba.mysql.MySQLAdapter > > INFO [28 Apr 2008 11:14:57.884] CREATE TABLE currency_rate (country > > VARCHAR(255) NOT NULL, currency_code VARCHAR(255) NOT NULL, > > currency_name > > VARCHAR(255) NOT NULL, currency_number INT NOT NULL, date DATETIME NULL, > > id > > INT NOT NULL, rate DECIMAL(19, 4) NOT NULL, PRIMARY KEY (id)) ENG > > INE=InnoDB > > > > Now, we are planning to use NDBCLUSTER table types and if this auto > > detection does not work, what is the way to set engine type via API? > > > > Looks like a limitation of MySQLSniffer. It does this to detect MySQL > default behavior: > > ResultSet rs = statement.executeQuery("SHOW VARIABLES LIKE > 'table_type'"); > if (rs.next()) { > String tableType = rs.getString(2); > supportFK = tableType != null && > tableType.toUpperCase().equals("INNODB"); > } > > But doesn't go far enough to actually use it as a table type in > 'createTable'. Shouldn't be too hard to fix. Appreciate a Jira for it. > > Andrus > >
