[ 
https://issues.apache.org/jira/browse/OPENJPA-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15030054#comment-15030054
 ] 

Romain Manni-Bucau commented on OPENJPA-2618:
---------------------------------------------

well per spec it is what we want since it is undefined and yes it is no more 
usable but the code is wrong. Once again it is a "current branch" term handling 
to avoid users to get a not handled exception at all as you noticed.

> Query for Tuple does not return Tuple instance
> ----------------------------------------------
>
>                 Key: OPENJPA-2618
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2618
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.4.0
>            Reporter: Oliver Gierke
>
> {code:java}
> TypedQuery<Tuple> query = em.createQuery("SELECT u.firstname from User u", 
> Tuple.class);
> List<Tuple> result = query.getResultList();
> List<TupleElement<?>> elements = result.get(0).getElements();
> {code}
> This breaks at {{result.get(0)}} with {{java.lang.ClassCastException: 
> java.lang.String cannot be cast to javax.persistence.Tuple}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to