openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-461) JPQL: navigation through embedded class field does not work
Date Tue, 11 Dec 2007 01:25:43 GMT

    [ 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.


Mime
View raw message