seade 2004/08/22 19:54:31 Modified: src/java/org/apache/torque TorqueInstance.java xdocs changes.xml Log: Use adapter in preference to driver when building the database map. Thanks to Ben Hogan for the patch. Revision Changes Path 1.8 +5 -4 db-torque/src/java/org/apache/torque/TorqueInstance.java Index: TorqueInstance.java =================================================================== RCS file: /home/cvs/db-torque/src/java/org/apache/torque/TorqueInstance.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TorqueInstance.java 20 Aug 2004 04:13:42 -0000 1.7 +++ TorqueInstance.java 23 Aug 2004 02:54:31 -0000 1.8 @@ -29,6 +29,7 @@ import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -601,10 +602,10 @@ // Setup other ID generators for this map. try { - String key = getDatabaseProperty(name, "driver"); - if (key == null || key.length() == 0) + String key = getDatabaseProperty(name, "adapter"); + if (StringUtils.isEmpty(key)) { - key = getDatabaseProperty(name, "adapter"); + key = getDatabaseProperty(name, "driver"); } DB db = DBFactory.create(key); for (int i = 0; i < IDGeneratorFactory.ID_GENERATOR_METHODS.length; 1.130 +10 -0 db-torque/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/db-torque/xdocs/changes.xml,v retrieving revision 1.129 retrieving revision 1.130 diff -u -r1.129 -r1.130 --- changes.xml 23 Aug 2004 00:30:10 -0000 1.129 +++ changes.xml 23 Aug 2004 02:54:31 -0000 1.130 @@ -3,11 +3,21 @@ <properties> <title>Changes</title> <author email="[EMAIL PROTECTED]">Martin Poeschl</author> + <author email="[EMAIL PROTECTED]">Scott Eade</author> </properties> <body> <release version="3.2-alpha" date="in CVS"> + <action dev='seade' type='add'> + The <code>adapter</code> property is now used in preference to + <code>driver</code> when building the database map. This allows Torque + to work when the driver setting is not what it expects - e.g. if using + <code>com.mysql</code> driver instead of the + <code>org.gjt.mm.mysql</code> or when using + <a http="http://www.p6spy.org/">P6Spy</a> pass through driver for + performance monitoring. Thanks to Ben Hogan for the patch. + </action> <action dev='seade' type='fix'> Multiple unique constraints and indexes on a single table are now allocated sequential names (previously duplicate names were being
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]