OpenJPA
  1. OpenJPA
  2. OPENJPA-187

MEMBER OF query fails on OpenJPA, but works fine with TopLink and Hibernate EM

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.7
    • Fix Version/s: 1.2.0, 1.3.0
    • Component/s: query
    • Labels:
      None

      Description

      What's wrong with the following query?

      Query query = em.createQuery("SELECT DISTINCT o FROM Osoba o WHERE :projekt MEMBER OF o.projekty");
      query.setParameter("projekt", new Projekt("Apache OpenEJB", RodzajProjektu.OTWARTY));
      List<Osoba> osoby = query.getResultList();
      assert osoby.size() == 1 : "Otrzymano " + osoby.size();

      where Projekt is an entity where @Id is of type String (the first input parameter in the two-param constructor above).

      TopLink 2.0 BUILD 40 and Hibernate EntityManager 3.3.0.GA work fine whereas OpenJPA 0.9.7-SNAPSHOT finishes with the java.lang.AssertionError error (it's the test itself actually, but since the query returns 0 elements the issue originates in OpenJPA).

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Pinaki Poddar
            Reporter:
            Jacek Laskowski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development