[
https://issues.apache.org/jira/browse/OPENJPA-2970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120115#comment-18120115
]
ASF subversion and git services commented on OPENJPA-2970:
----------------------------------------------------------
Commit ee1e4acc178e7d4a07369f0d43475f4a810ac592 in openjpa's branch
refs/heads/OPENJPA-2989 from Paulo Cristovão de Araújo Silva Filho
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=ee1e4acc1 ]
Merge pull request #184 from apache/OPENJPA-2970
[OPENJPA-2970] Let an explicit null named parameter win over positional lookup
> Null named parameter falls through to positional lookup
> -------------------------------------------------------
>
> Key: OPENJPA-2970
> URL: https://issues.apache.org/jira/browse/OPENJPA-2970
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion thread:
> https://github.com/apache/openjpa/pull/144#discussion_r3683003222
> **(medium)** Using `userParams.get(name) == null` to fall through to
> positional lookup means an explicitly bound null named parameter is silently
> replaced by whatever is registered under the position key - `containsKey`
> should distinguish "bound to null" from "absent". Related: the new
> `c.getIndex() < params.length` guards at lines 188/195 silently skip binding
> instead of failing, turning a caller bug into an unbound-parameter
> SQLException far from the cause.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)