mirror of https://github.com/apache/openjpa.git
Added supportsTimestampNanos to allow people to work around an ArrayIndexOutOfBoundsException that occurs when using multiple timestamp columns with version 9.2+ of the Oracle JDBC driver and version less than 9.2 of the Oracle server.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@453715 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
27e8bd4849
commit
b25dfe66f4
openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql
|
@ -153,6 +153,7 @@ 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;
|
||||
|
@ -1040,7 +1041,11 @@ public class DBDictionary
|
|||
val.setTime(val.getTime() + 1000);
|
||||
nanos = 0;
|
||||
}
|
||||
val.setNanos(nanos);
|
||||
|
||||
if (supportsTimestampNanos)
|
||||
val.setNanos(nanos);
|
||||
else
|
||||
val.setNanos(0);
|
||||
|
||||
if (cal == null)
|
||||
stmnt.setTimestamp(idx, val);
|
||||
|
|
Loading…
Reference in New Issue