From dev-return-16043-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Apr 07 19:23:07 2010 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 21041 invoked from network); 7 Apr 2010 19:22:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Apr 2010 19:22:56 -0000 Received: (qmail 31302 invoked by uid 500); 7 Apr 2010 19:22:56 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 31269 invoked by uid 500); 7 Apr 2010 19:22:56 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 31260 invoked by uid 99); 7 Apr 2010 19:22:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Apr 2010 19:22:56 +0000 X-ASF-Spam-Status: No, hits=-1242.4 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Apr 2010 19:22:54 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 897FB234C4A9 for ; Wed, 7 Apr 2010 19:22:33 +0000 (UTC) Message-ID: <1491196321.50101270668153562.JavaMail.jira@brutus.apache.org> Date: Wed, 7 Apr 2010 19:22:33 +0000 (UTC) From: "Donald Woods (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-1615) CriteriaQuery test failures on MSSQL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 CriteriaQuery test failures on MSSQL ------------------------------------ Key: OPENJPA-1615 URL: https://issues.apache.org/jira/browse/OPENJPA-1615 Project: OpenJPA Issue Type: Bug Components: jpa Affects Versions: 2.0.0-beta3 Reporter: Donald Woods Fix For: 2.0.1 Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL: 1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail - junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314) at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164) at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141) at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108) at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908) . . . Caused by: org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010] . . . Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010] 2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()- org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005] . . . Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005] . . . NestedThrowables: com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.