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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: