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

Query with expression IN (collection_valued_input_parameter) should report syntax error, correct usange is IN collection_valued_input_parameter

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • None
    • None
    • openjpa-2.1.0-20101001.064809-70

    Description

      for (int i = 0; i < 2; i ++) {
      List categories = new LinkedList();
      categories.add("01");
      categories.add("02");
      categories.add("03");
      Query q = entityManager.createQuery("select v.id from Category v where v.id in () order by v.id asc");
      q.setParameter("p", categories);
      List results = q.getResultList();
      for (Iterator it = results.iterator(); it.hasNext(); )
      System.out.print(it.next() + ", ");
      System.out.println();
      }

      The above code will produce the following output:
      01, 02, 03,
      02, 03,

      "01" is missing when the second time the same query is executed.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            fancy Catalina Wei
            azuo_lee Azuo Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment