[ http://issues.apache.org/jira/browse/TORQUE-27?page=comments#action_12421298 ] Thomas Fischer commented on TORQUE-27: --------------------------------------
First of all, you can tell mysql to use innoDB as default for new tables in the database's my.conf, if that is the only problem. Then I agree with Thoralf that replacing the emplate is inflexible and error-prone, there should be a better way to do it (like being able to "override" or "extend" templates), but this is a big task and would need a major rewrite of the generator. Also I agree with Thoralf that if hints are added, they should be added to the schema. A minor point is that hints will break compatibility with other databases. Up to now, if you write a db schema in Torque and do not use "bad words" (i.e. words that are reserved in one or more databases), you could create your schema on any database. I would expect hints not to be standardized in any way, so this would break compatibility. Last, I do not know whether hints are used in other databases than mysql. If they are not used in other databases, I do not think the schema should be cluttered up by a mysql-specific feature. > Need ability to pass global user-configurable platform-specific hints to > templates > ---------------------------------------------------------------------------------- > > Key: TORQUE-27 > URL: http://issues.apache.org/jira/browse/TORQUE-27 > Project: Torque > Issue Type: Improvement > Components: Generator > Affects Versions: 3.2 > Environment: Fedora Core 5 Linux, Sun JDK1.4.2_08. > Reporter: Adrian Price > Priority: Minor > > It would be useful to provide a generic mechanism to enable the user to pass > global platform-specific hints to templates. For example, for MySQL it is > desirable to explicitly specify the type of table to be created, e.g., CREATE > TABLE foo (...) Type = InnoDB. Such global hints could then be specified by > the user through platform specific properties or property files, as in: > platform.properties: > mysql.table.hint=Type = InnoDB. > A matching table.vm template might look something like: > # ----------------------------------------------------------------------- > # $table.Name > # ----------------------------------------------------------------------- > $generator.parse("$basepath/drop.vm", "", "table", $tbl) > CREATE TABLE $table.Name > ( > etc... > ) $platform.getProperty('mysql.table.hint'); > Without such a capability it is necessary to hard-code the required > customizations into the templates, which is a rather inflexible and > inconvenient way of doing it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]