Skip to content

Conversation

@xiaoye-2018
Copy link

@xiaoye-2018 xiaoye-2018 commented Jun 14, 2025

Repairing coalescence (ids, 1) will generate SQL for coalescence ((?,?,?), 1).
Similar situations: order by field(id , :id)

current:
Even though coalescence (: param1,: param2, 1) , only generating coalescence (?,?,?, 1), not add extral parentheses


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19540

@gavinking
Copy link
Member

I doubt it's really correct to assume that an expression which follows a , is a parenthesized expression.

I mean, what about stuff like:

 insert into table (col1, col2) values (1,2), (3,4)

@xiaoye-2018
Copy link
Author

I doubt it's really correct to assume that an expression which follows a , is a parenthesized expression.

I mean, what about stuff like:

 insert into table (col1, col2) values (1,2), (3,4)

performing:
insert table xx (col1, col2) values (?,?)
Can collection be used as a parameter under normal circumstances?

@yrodiere
Copy link
Member

yrodiere commented Oct 6, 2025

FTR, I added a comment on the Jira issue, where the need for a fix is under discussion: https://hibernate.atlassian.net/browse/HHH-19540

@yrodiere
Copy link
Member

yrodiere commented Oct 6, 2025

Closing in favor of https://hibernate.atlassian.net/browse/HHH-19842, as explained in the comments of https://hibernate.atlassian.net/browse/HHH-19540

@yrodiere yrodiere closed this Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants