You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by al...@apache.org on 2011/02/10 04:07:56 UTC
svn commit: r1069208 -
/openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java
Author: allee8285
Date: Thu Feb 10 03:07:55 2011
New Revision: 1069208
URL: http://svn.apache.org/viewvc?rev=1069208&view=rev
Log:
OPENJPA-1938 Update timeTypeName from DATETIME to DATETIME2 to match the other date/timestamp data type.
Modified:
openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java
Modified: openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java?rev=1069208&r1=1069207&r2=1069208&view=diff
==============================================================================
--- openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java (original)
+++ openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java Thu Feb 10 03:07:55 2011
@@ -22,13 +22,9 @@ import java.sql.Blob;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
-import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
-import java.sql.Timestamp;
import java.sql.Types;
-import java.util.Calendar;
-import java.util.Set;
import org.apache.openjpa.jdbc.identifier.DBIdentifier;
import org.apache.openjpa.jdbc.kernel.JDBCStore;
@@ -95,7 +91,7 @@ public class SQLServerDictionary extends
// MSSQL 2008 supports new date, time and datetime2 types
// Use DATETIME2 which has 100ns vs. 3.333msec precision
dateTypeName = "DATETIME2";
- timeTypeName = "DATETIME";
+ timeTypeName = "DATETIME2";
timestampTypeName = "DATETIME2";
}
} else {
@@ -262,7 +258,7 @@ public class SQLServerDictionary extends
}
private void appendXmlValue(SQLBuffer buf, FilterValue val) {
- Class rc = Filters.wrap(val.getType());
+ Class<?> rc = Filters.wrap(val.getType());
int type = getJDBCType(JavaTypes.getTypeCode(rc), false);
boolean isXmlAttribute = (val.getXmlMapping() == null)
? false : val.getXmlMapping().isXmlAttribute();