Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 19690 invoked from network); 15 Feb 2009 18:33:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Feb 2009 18:33:21 -0000 Received: (qmail 17960 invoked by uid 500); 15 Feb 2009 18:33:20 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 17938 invoked by uid 500); 15 Feb 2009 18:33:20 -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 17927 invoked by uid 99); 15 Feb 2009 18:33:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 10:33:20 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Sun, 15 Feb 2009 18:33:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 99907234C48B for ; Sun, 15 Feb 2009 10:32:59 -0800 (PST) Message-ID: <261887759.1234722779605.JavaMail.jira@brutus> Date: Sun, 15 Feb 2009 10:32:59 -0800 (PST) From: "Milosz Tylenda (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-920) LIKE does not accept expression as second parameter In-Reply-To: <1113605370.1234361939572.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673687#action_12673687 ] Milosz Tylenda commented on OPENJPA-920: ---------------------------------------- You can make this bug invalid or, if you think this lacking functionality is important, you can change the issue type from Bug to Wish, for example. > LIKE does not accept expression as second parameter > --------------------------------------------------- > > Key: OPENJPA-920 > URL: https://issues.apache.org/jira/browse/OPENJPA-920 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 1.2.0 > Environment: JDK 1.6 > Reporter: Georgi Naplatanov > > I have simple data object : > @Id > String Id ; > > @Basic > @Column(name="my_value", nullable=false, length=36) > String value ; > OpenJPA give my the following exception when execute the query: > SELECT t from MySimpleObject t WHERE ?1 like concat(t.value,'%') > Exception in thread "main" org.apache.openjpa.persistence.ArgumentException: Encountered "? 1 like concat" at character 38, but expected: ["(", "*", "+", "-", "/", ":", "<", "<=", "<>", "=", ">", ">=", "?", "BETWEEN", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "EXISTS", "IS", "LIKE", "MEMBER", "NOT", , , , , ]. > at org.apache.openjpa.kernel.jpql.JPQL.generateParseException(JPQL.java:9501) > at org.apache.openjpa.kernel.jpql.JPQL.jj_consume_token(JPQL.java:9378) > at org.apache.openjpa.kernel.jpql.JPQL.conditional_primary(JPQL.java:1947) > at org.apache.openjpa.kernel.jpql.JPQL.conditional_factor(JPQL.java:1925) > at org.apache.openjpa.kernel.jpql.JPQL.conditional_term(JPQL.java:1791) > at org.apache.openjpa.kernel.jpql.JPQL.conditional_expression(JPQL.java:1753) > at org.apache.openjpa.kernel.jpql.JPQL.where_clause(JPQL.java:1556) > at org.apache.openjpa.kernel.jpql.JPQL.select_statement(JPQL.java:91) > at org.apache.openjpa.kernel.jpql.JPQL.parseQuery(JPQL.java:63) > at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1740) > at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.(JPQLExpressionBuilder.java:1727) > at org.apache.openjpa.kernel.jpql.JPQLParser.parse(JPQLParser.java:48) > at org.apache.openjpa.kernel.ExpressionStoreQuery.newCompilation(ExpressionStoreQuery.java:149) > at org.apache.openjpa.datacache.QueryCacheStoreQuery.newCompilation(QueryCacheStoreQuery.java:241) > at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:657) > at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:639) > at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:605) > at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:667) > at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1492) > at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:123) > at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:243) > at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:293) > at Tester.simpleJpql(Tester.java:87) > at Tester.main(Tester.java:180) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.