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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0, 2.0.1, 2.1.0
    • 2.1.0
    • performance
    • 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

        1. OPENJPA-1738.patch
          5 kB
          Catalina Wei

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: