Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 24332 invoked from network); 11 Dec 2007 01:26:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2007 01:26:06 -0000 Received: (qmail 37317 invoked by uid 500); 11 Dec 2007 01:25:54 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 37287 invoked by uid 500); 11 Dec 2007 01:25:54 -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 37278 invoked by uid 99); 11 Dec 2007 01:25:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2007 17:25:54 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2007 01:26:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1CA1F714233 for ; Mon, 10 Dec 2007 17:25:43 -0800 (PST) Message-ID: <19589442.1197336343091.JavaMail.jira@brutus> Date: Mon, 10 Dec 2007 17:25:43 -0800 (PST) From: "Patrick Linskey (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-461) JPQL: navigation through embedded class field does not work In-Reply-To: <10478510.1196952523389.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-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550260 ] Patrick Linskey commented on OPENJPA-461: ----------------------------------------- It sounds like this might be a duplicate of OPENJPA-199. > JPQL: navigation through embedded class field does not work > ----------------------------------------------------------- > > Key: OPENJPA-461 > URL: https://issues.apache.org/jira/browse/OPENJPA-461 > Project: OpenJPA > Issue Type: Bug > Components: query > Affects Versions: 0.9.7 > Environment: BEA WebLogic Server 10 > Reporter: Ajay Aggarwal > Fix For: 1.0.0 > > > Hi Ajay Aggarwal, > I think your query is correct and should work. According to the Java Persistence query language BNF the expression following the keyword SET might be a state_field and state_field includes navigation through an > embedded: > state_field ::= {embedded_class_state_field.}*simple_state_field > I propose you file a JIRA issue. > Regards Michael > > I am trying to update a field of the embedded class using query, but > > its not working. In the following code, 'registration' is an embedded > > class field inside 'User' and 'authenticated' is a boolean field > > inside this embedded class. > > > > > > > > Query q = em.createQuery("UPDATE User s SET > > s.registration.authenticated = :auth"); > > > > q.setParameter("auth", false); > > > > > > > > I am getting following error. What is the correct syntax for such a > > query? > > > > > > > > openjpa.persistence.ArgumentException: An error occurred while parsing > > the query filter 'UPDATE User s SET s.registration.authenticated = > > :auth'. Error message: <4|false|0.9.7> > > org.apache.openjpa.kernel.jpql.ParseException: Encountered "." at > > character 33, but expected: ["="]. > > > > > > > > Thanks. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.