OpenJPA
  1. OpenJPA
  2. OPENJPA-1738

Prepared SQL query does not handle collection-valued parameter of persistence-capable objects

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.0.1, 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: performance
    • Labels:
      None

      Description

      Patrick Linskey wrote:
      I just ran into what I believe is a bug with the prepared SQL code. In PreparedQueryImpl.reparameterize(), we have the following code:

      > if (ImplHelper.isManageable(val))

      { > setPersistenceCapableParameter(result, val, indices, broker); > }

      else if (val instanceof Collection)

      { > setCollectionValuedParameter(result, (Collection)val, indices, > key); > }

      This does not work if the parameter is a collection of persistence-capable objects, as setCollectionValuedParameter assumes that the values are not PCs.

        Issue Links

          Activity

          Hide
          Michael Dick added a comment -

          Closing issues which have been resolved for some time. If the problem persists, please reopen.

          Show
          Michael Dick added a comment - Closing issues which have been resolved for some time. If the problem persists, please reopen.

            People

            • Assignee:
              Catalina Wei
              Reporter:
              Catalina Wei
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development