Index: src/java/org/apache/turbine/om/DateKey.java
===================================================================
RCS file: /home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/om/DateKey.java,v
retrieving revision 1.2
diff -u -r1.2 DateKey.java
--- src/java/org/apache/turbine/om/DateKey.java	2001/08/20 03:49:49	1.2
+++ src/java/org/apache/turbine/om/DateKey.java	2001/08/31 19:14:21
@@ -155,9 +155,10 @@
 
     public String toString()
     {
-        if ( key != null ) 
+        Date dt = getDate();
+        if ( dt != null )
         {
-            return key.toString();
+            return Long.toString(dt.getTime());
         }
         return "";
     }
Index: src/java/org/apache/turbine/om/Persistent.java
===================================================================
RCS file: /home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/om/Persistent.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Persistent.java
--- src/java/org/apache/turbine/om/Persistent.java	2001/08/16 05:08:39	1.1.1.1
+++ src/java/org/apache/turbine/om/Persistent.java	2001/08/31 19:14:21
@@ -1,5 +1,7 @@
 package org.apache.turbine.om;
 
+import org.apache.turbine.util.db.pool.DBConnection;
+
 /* ====================================================================
  * The Apache Software License, Version 1.1
  *
@@ -122,4 +124,19 @@
      * Saves the object.
      */
     public void save() throws Exception;
+
+    /**
+     * Stores the object in the database.  If the object is new,
+     * it inserts it; otherwise an update is performed.
+     */
+    public void save(String dbName) throws Exception;
+
+    /**
+     * Stores the object in the database.  If the object is new,
+     * it inserts it; otherwise an update is performed.  This method
+     * is meant to be used as part of a transaction, otherwise use
+     * the save() method and the connection details will be handled
+     * internally
+     */
+    public void save(DBConnection dbCon) throws Exception;
 }
Index: src/java/org/apache/turbine/util/db/SqlExpression.java
===================================================================
RCS file: /home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/util/db/SqlExpression.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 SqlExpression.java
--- src/java/org/apache/turbine/util/db/SqlExpression.java	2001/08/16 05:09:49	1.1.1.1
+++ src/java/org/apache/turbine/util/db/SqlExpression.java	2001/08/31 19:14:22
@@ -59,6 +59,7 @@
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.sql.Timestamp;
 
 import org.apache.turbine.om.DateKey;
 import org.apache.turbine.om.ObjectKey;
@@ -290,7 +291,8 @@
            else if( criteria instanceof java.util.Date ||
                     criteria instanceof DateKey)
            {
-               criteria = db.getDateString(criteria.toString());
+               Date dt = criteria instanceof Date?(Date) criteria:((DateKey)criteria).getDate();
+               criteria = "{ts '" + new Timestamp(dt.getTime()).toString() + "'}";
            }
            else if( criteria instanceof Boolean )
            {

