OpenJPA
  1. OpenJPA
  2. OPENJPA-1039

Dynamic query predicates must not treat AND OR operators as associative

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-M1
    • Component/s: query
    • Labels:
      None

      Description

      Predicate p1 = e.get("salary").greaterThan(100);
      Predicate p2 = e.get("rating").equal(5);
      Predicate p3 = e.get("name").like("John");

      Predicate w1 = p1.and(p2.or(p3));
      Predicate w2 = (p1.and(p2)).or(p3);

      w1 and w2 are not the same.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development