From fe7601ce39494ddb9dc2fa0006962397a66403a2 Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Thu, 10 Feb 2011 03:07:55 +0000 Subject: [PATCH] OPENJPA-1938 Update timeTypeName from DATETIME to DATETIME2 to match the other date/timestamp data type. git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.1.x@1069208 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/openjpa/jdbc/sql/SQLServerDictionary.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java index c92d75329..dbe121c82 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java @@ -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 AbstractSQLServerDictionary { // 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 AbstractSQLServerDictionary { } 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();