OpenJPA
  1. OpenJPA
  2. OPENJPA-1458

Named parameters are not handled by OpenJPA correctly

    Details

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

      Description

      Named parameters are not handled correctly as shown below

      9093 erww TRACE [main] openjpa.Query - Executing query: [select o from OrderJPA o where o.OrderId in (select max(o1.OrderId) from OrderJPA o1 where ((o1.CustomerId = :customerId) and (o1.DistrictId = :districtId) and (o1.WarehouseId = :warehouseId))) and (o.WarehouseId = :warehouseId) and (o.CustomerId = :customerId) and (o.DistrictId = :districtId)] with parameters:

      {customerId=10, districtId=1, warehouseId=12}

      9194 erww TRACE [main] openjpa.jdbc.SQL - <t 29744585, conn 23467239> executing prepstmnt 15580729 SELECT t0.O_D_ID, t0.O_ID, t0.O_W_ID, t0.O_ALL_LOCAL, t0.O_CARRIER_ID, t0.O_C_ID, t0.O_ENTRY_D, t0.O_OL_CNT FROM ORDERS t0 WHERE (t0.O_ID IN (SELECT MAX(t1.O_ID) FROM ORDERS t1 WHERE (t1.O_C_ID = ? AND t1.O_D_ID = ? AND t1.O_W_ID = ?) ) AND t0.O_W_ID = ? AND t0.O_C_ID = ? AND t0.O_D_ID = ?) optimize for 1 row [params=(short) 10, (short) 1, (short) 12, (short) 12, (short) 12, (short) 12]

      Release 1.2 and 1.3 works fine. This problem only happens in the trunk.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        54d 22h 50m 1 Fay Wang 09/Mar/10 18:12
        Resolved Resolved Closed Closed
        6s 1 Fay Wang 09/Mar/10 18:12
        Joachim Bartz made changes -
        Attachment OPENJPA-1458-TestCases.jar [ 12430581 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-beta3 [ 12314857 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Fay Wang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Fay Wang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Joachim Bartz made changes -
        Field Original Value New Value
        Attachment OPENJPA-1458-TestCases.jar [ 12430581 ]
        Hide
        Joachim Bartz added a comment -

        Hi Fay.

        I spend some time to get the failure.
        I added a few test cases and entities but was not able to do so.
        Is there a way to get the failing entity?

        But, maybe these file can help to make OpenJPA a little bit better.

        Best regards
        Achim

        Show
        Joachim Bartz added a comment - Hi Fay. I spend some time to get the failure. I added a few test cases and entities but was not able to do so. Is there a way to get the failing entity? But, maybe these file can help to make OpenJPA a little bit better. Best regards Achim
        Fay Wang created issue -

          People

          • Assignee:
            Fay Wang
            Reporter:
            Fay Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development