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 ------------------------------------------------------------------------- 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