You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2002/03/01 23:37:07 UTC
cvs commit: jakarta-turbine-torque/src/java/org/apache/torque/task TorqueSQLExec.java
dlr 02/03/01 14:37:07
Modified: src/java/org/apache/torque/task TorqueSQLExec.java
Log:
Patch by Age Mooy <am...@home.nl>:
"This is a patch for the problem discussed in my mail on the
turbine-user list posted earlier today (RE: TDK snapshot
incl. decoupled torque (buglist)). It makes the TorqueSQLExec task
execute sql files in alphabetical order (though still with the
*-schema.sql files before all other files). This is the order in which
they were generated with the TorqueSQL task.
This stops different idtable-init.sql files from deleting each other's
entries."
Revision Changes Path
1.5 +6 -3 jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueSQLExec.java
Index: TorqueSQLExec.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueSQLExec.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -u -r1.4 -r1.5
--- TorqueSQLExec.java 1 Mar 2002 14:16:01 -0000 1.4
+++ TorqueSQLExec.java 1 Mar 2002 22:37:07 -0000 1.5
@@ -72,6 +72,8 @@
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.Properties;
+import java.util.TreeSet;
+import java.util.Iterator;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.Driver;
@@ -99,7 +101,7 @@
* @author <a href="mailto:tim.stephenson@sybase.com">Tim Stephenson</A>
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</A>
* @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
- * @version $Id: TorqueSQLExec.java,v 1.4 2002/03/01 14:16:01 mpoeschl Exp $
+ * @version $Id: TorqueSQLExec.java,v 1.5 2002/03/01 22:37:07 dlr Exp $
*/
public class TorqueSQLExec extends Task
{
@@ -463,10 +465,11 @@
}
Hashtable h = new Hashtable();
+ TreeSet keys = new TreeSet(p.keySet());
- for (Enumeration e = p.propertyNames(); e.hasMoreElements();)
+ for (Iterator e = keys.iterator(); e.hasNext();)
{
- String sqlfile = (String) e.nextElement();
+ String sqlfile = (String) e.next();
String database = p.getProperty(sqlfile);
ArrayList x = (ArrayList) h.get(database);
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>