From f0f3a4c588ff8a7c78e95d12b46ed54e8cfae838 Mon Sep 17 00:00:00 2001 From: Fay Wang Date: Mon, 23 Aug 2010 16:01:45 +0000 Subject: [PATCH] OPENJPA-735: OpenJPA support for SolidDB git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@988164 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/openjpa/jdbc/kernel/exps/CurrentDate.java | 3 +-- .../java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CurrentDate.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CurrentDate.java index 5d8da25d5..27f5c7c99 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CurrentDate.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CurrentDate.java @@ -64,11 +64,10 @@ class CurrentDate public Object getValue(Object[] params) { try { - _type.getConstructor(long.class).newInstance(System.currentTimeMillis()); + return _type.getConstructor(long.class).newInstance(System.currentTimeMillis()); } catch (Exception e) { return new Date(); } - return null; } public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java index 14cde58f7..018f74a57 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java @@ -119,6 +119,7 @@ public class SolidDBDictionary supportsNullUniqueColumn = false; concatenateFunction = "CONCAT({0},{1})"; + stringLengthFunction = "LENGTH({0})"; trimLeadingFunction = "LTRIM({0})"; trimTrailingFunction = "RTRIM({0})"; trimBothFunction = "TRIM({0})";