From 2b3f7ec90c3a834917232f4cdf27d00d0f62905a Mon Sep 17 00:00:00 2001 From: Catalina Wei Date: Thu, 26 Jun 2008 20:11:51 +0000 Subject: [PATCH] OPENJPA-645 Date millisecond precision lost for Informix IDS and SQLServer Commit the patch provided by Dinkar Rao git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@672017 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java | 6 +----- .../org/apache/openjpa/jdbc/sql/InformixDictionary.java | 2 -- .../org/apache/openjpa/jdbc/sql/SQLServerDictionary.java | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java index f52c71166..62069d9c2 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java @@ -179,7 +179,6 @@ public class DBDictionary public int maxIndexNameLength = 128; public int maxIndexesPerTable = Integer.MAX_VALUE; public boolean supportsForeignKeys = true; - public boolean supportsTimestampNanos = true; public boolean supportsUniqueConstraints = true; public boolean supportsDeferredConstraints = true; public boolean supportsRestrictDeleteAction = true; @@ -1124,10 +1123,7 @@ public class DBDictionary nanos = 0; } - if (supportsTimestampNanos) - val.setNanos(nanos); - else - val.setNanos(0); + val.setNanos(nanos); if (cal == null) stmnt.setTimestamp(idx, val); diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java index 79399fd3d..0a199612f 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java @@ -133,8 +133,6 @@ public class InformixDictionary // Informix doesn't support aliases in deletes if the table has an index allowsAliasInBulkClause = false; - supportsTimestampNanos = false; - // Informix doesn't understand "X CROSS JOIN Y", but it does understand // the equivalent "X JOIN Y ON 1 = 1" crossJoinClause = "JOIN"; 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 ed055b474..18ac7cc65 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 @@ -59,7 +59,6 @@ public class SQLServerDictionary requiresAliasForSubselect = true; stringLengthFunction = "LEN({0})"; - supportsTimestampNanos = false; } public void connectedConfiguration(Connection conn)