Details

    • Type: Sub-task Sub-task
    • Status: Reopened
    • Priority: Major 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

      Transition Time In Source Status Execution Times Last Executer Last Execution Date
      Open Open In Progress In Progress
      48d 13h 44m 1 Donald Woods 17/Sep/09 18:16
      In Progress In Progress Resolved Resolved
      1h 31m 1 Donald Woods 17/Sep/09 19:47
      Resolved Resolved Closed Closed
      172d 23h 43m 1 Donald Woods 09/Mar/10 18:31
      Closed Closed Reopened Reopened
      331d 20h 11m 1 Kevin Sutter 04/Feb/11 14:42
      Kevin Sutter made changes -
      Resolution Fixed [ 1 ]
      Status Closed [ 6 ] Reopened [ 4 ]
      Assignee Donald Woods [ drwoods ] Kevin Sutter [ kwsutter ]
      Hide
      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
      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.
      Donald Woods made changes -
      Status Resolved [ 5 ] Closed [ 6 ]
      Donald Woods made changes -
      Status In Progress [ 3 ] Resolved [ 5 ]
      Fix Version/s 1.3.0 [ 12313326 ]
      Fix Version/s 2.0.0-M3 [ 12314148 ]
      Fix Version/s 2.0.0 [ 12314019 ]
      Resolution Fixed [ 1 ]
      Hide
      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
      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.
      Donald Woods made changes -
      Status Open [ 1 ] In Progress [ 3 ]
      Donald Woods made changes -
      Assignee Tim McConnell [ mcconne ] Donald Woods [ drwoods ]
      Hide
      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
      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
      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
      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
      Pinaki Poddar added a comment -

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

      Show
      Pinaki Poddar added a comment - 1.2.x had wrong behavior. To maintain wrong behavior as 'backward compatibility' will be misusing 'compatibility'.
      Tim McConnell made changes -
      Attachment OPENJPA-1213-TESTCASE-2.patch [ 12415109 ]
      Hide
      Tim McConnell added a comment -

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

      Show
      Tim McConnell added a comment - A couple more testcases that demonstrates the similar failures with query.setParameter()
      Tim McConnell made changes -
      Attachment OPENJPA-1213-TESTCASE.patch [ 12415098 ]
      Tim McConnell made changes -
      Attachment OPENJPA-1212-TESTCASE.patch [ 12415097 ]
      Tim McConnell made changes -
      Patch Info [Patch Available]
      Tim McConnell made changes -
      Attachment OPENJPA-1212-TESTCASE.patch [ 12415097 ]
      Hide
      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
      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);
      Tim McConnell made changes -
      Fix Version/s 2.0.0 [ 12314019 ]
      Tim McConnell made changes -
      Field Original Value New Value
      Assignee Tim McConnell [ mcconne ]
      Affects Version/s 1.2.2 [ 12313681 ]
      Affects Version/s 2.0.0 [ 12314019 ]
      Tim McConnell created issue -

        People

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

          Dates

          • Created:
            Updated:

            Development