Skip to content

Provide support for JDOQL/JPQL parameter mapped to multiple SQL statement parameters #440

@andyjefferson

Description

@andyjefferson

If we want to have a statement like
SELECT ... FROM MYTABLE WHERE MYCOL IN (?,?,?,?,?, ...)
we could allow the input of a single JDOQL / JPQL parameter that is a Collection / array, and each element maps to a JDBC parameter.
The JDOQL could be something like
SELECT FROM mydomain.MyClass WHERE :myParam.contains(this.field)
and myParam is passed in as a Collection.

One way would be to internally name the parameters as myParam#0, myParam#1, ... myParam#N.
The benefit of this feature is very limited since it is simply trying to make the SQL statement reusable, but that only applies when the Collection has the same number of elements.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions