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

          Catalina Wei created issue -
          Catalina Wei made changes -
          Field Original Value New Value
          Attachment OPENJPA-1738.patch [ 12450084 ]
          Catalina Wei made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.1.0 [ 12314542 ]
          Resolution Fixed [ 1 ]
          Michael Dick made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Heath Thomann made changes -
          Link This issue relates to OPENJPA-2118 [ OPENJPA-2118 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development