On Sat, Nov 8, 2008 at 9:49 PM, Dan Pascu <[EMAIL PROTECTED]> wrote: > On Friday 07 November 2008, Brian Long wrote: >> I'll admit I'm a newbie to SQLObject. I understand MySQL only >> supports cascade on delete using the InnoDB engine. When I define a >> class foreign key and specify "cascade=True", MySQL does not store >> this because the default engine is MyISAM. >> >> Since the sqlmeta createSQL code gets run after table creation, >> specifying "ALTER TABLE foo ENGINE InnoDB" runs after the foreign key >> constraint was created. This means I have to re-construct / re-add >> the constraint inside createSQL. Are there any better ways to >> accomplish this? > > You can configure mysql to use innodb by default, so all new tables are > created with the innodb engine unless specified otherwise. This way it's > also easy to use myisam when needed by using a sqlmeta.createSQL.
Dan, You're right. I could edit my.cnf and specify InnoDB as default, but that would be a system-wide change. I cannot do this on systems where I share MySQL with other developers who might assume MyISAM is default. As it is now, my running the query to set engine = innodb works for me. If SQLObject supports the other methodology in the future, I could switch to it. Thanks for all the responses. /Brian/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss