Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2618

Query for Tuple does not return Tuple instance

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: jpa
    • Labels:
      None

      Description

      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();
      

      This breaks at result.get(0) with java.lang.ClassCastException: java.lang.String cannot be cast to javax.persistence.Tuple.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              oliver.gierke Oliver Drotbohm
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: