Details

    • Type: Sub-task
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2, 2.0.0
    • Fix Version/s: 1.3.0, 2.0.0-M3
    • Component/s: None
    • Labels:
      None
    • Patch Info:
      Patch Available
    1. OPENJPA-1213-TESTCASE-2.patch
      15 kB
      Tim McConnell
    2. OPENJPA-1213-TESTCASE.patch
      26 kB
      Tim McConnell

      Activity

      Hide
      kwsutter Kevin Sutter added a comment -

      Going to update the documentation just a bit. The current doc updates due to this JIRA were overstating the problem. I will do the updates for the trunk and 2.1 branches. I will leave the other branch updates to the respective owners.

      Show
      kwsutter Kevin Sutter added a comment - Going to update the documentation just a bit. The current doc updates due to this JIRA were overstating the problem. I will do the updates for the trunk and 2.1 branches. I will leave the other branch updates to the respective owners.
      Hide
      drwoods Donald Woods added a comment -

      Testcases checked into 1.3.x and trunk, with code updates to use OpenJPAVersion to determine the expected test result behaviors. Add entries into the migration appendix about the behavior change.
      Thanks to Tim McConnell for finding this issue and providing the testcases.

      Show
      drwoods Donald Woods added a comment - Testcases checked into 1.3.x and trunk, with code updates to use OpenJPAVersion to determine the expected test result behaviors. Add entries into the migration appendix about the behavior change. Thanks to Tim McConnell for finding this issue and providing the testcases.
      Hide
      mcconne Tim McConnell added a comment -

      Hi Craig, yes in JPA 2.0 it will throw a java.lang.IllegalArgumentException. In previous versions of JPA (i.e., 1.2.x) though it would work – so not sure how many previous users (if any) might be dependent upon this behavior.

      Show
      mcconne Tim McConnell added a comment - Hi Craig, yes in JPA 2.0 it will throw a java.lang.IllegalArgumentException. In previous versions of JPA (i.e., 1.2.x) though it would work – so not sure how many previous users (if any) might be dependent upon this behavior.
      Hide
      clr Craig L Russell added a comment -

      > Query query = em.createQuery("SELECT d from Department d");
      > query.setParameter(1, DEPT_NAME);

      Ok,I'll take the bait.

      What is the setParameter method supposed to do except throw an exception "No such parameter"?

      Show
      clr Craig L Russell added a comment - > Query query = em.createQuery("SELECT d from Department d"); > query.setParameter(1, DEPT_NAME); Ok,I'll take the bait. What is the setParameter method supposed to do except throw an exception "No such parameter"?
      Hide
      ppoddar@apache.org Pinaki Poddar added a comment -

      1.2.x had wrong behavior. To maintain wrong behavior as 'backward compatibility' will be misusing 'compatibility'.

      Show
      ppoddar@apache.org Pinaki Poddar added a comment - 1.2.x had wrong behavior. To maintain wrong behavior as 'backward compatibility' will be misusing 'compatibility'.
      Hide
      mcconne Tim McConnell added a comment -

      A couple more testcases that demonstrates the similar failures with query.setParameter()

      Show
      mcconne Tim McConnell added a comment - A couple more testcases that demonstrates the similar failures with query.setParameter()
      Hide
      mcconne Tim McConnell added a comment -

      Past releases of OpenJPA (e.g., 1.2.x) allowed the followed parameter substitution, but OpenJPA 2.0 does not. The attached testcase demonstrates this failure.

      Query query = em.createQuery("SELECT d from Department d");
      query.setParameter(1, DEPT_NAME);

      Show
      mcconne Tim McConnell added a comment - Past releases of OpenJPA (e.g., 1.2.x) allowed the followed parameter substitution, but OpenJPA 2.0 does not. The attached testcase demonstrates this failure. Query query = em.createQuery("SELECT d from Department d"); query.setParameter(1, DEPT_NAME);

        People

        • Assignee:
          kwsutter Kevin Sutter
          Reporter:
          mcconne Tim McConnell
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:

            Development