You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Oliver Gierke (JIRA)" <ji...@apache.org> on 2015/11/27 16:06:10 UTC

[jira] [Created] (OPENJPA-2618) Query for Tuple does not return Tuple instance

Oliver Gierke created OPENJPA-2618:
--------------------------------------

             Summary: 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)