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

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment