Skip to content

Conversation

@dreab8
Copy link
Member

@dreab8 dreab8 commented Nov 4, 2025

Fix #2412

Based on Vert.X team feedbacks the proposed change forces the explicit type cast of the parameters in the CTE select query.

…or databases supporting Global Temporary issue with transactions

Created a PostgreSQLCteMutationSelect that wraps JdbcSelect and change the original SQL string adding explicit cast to parameters
addExplicitCastToParameters(
jdbcParameterBindings,
newSelect,
context.getSession().getSessionFactory().getMappingMetamodel().getTypeConfiguration()

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
QueryParameterBindingTypeResolver.getTypeConfiguration
should be avoided because it has been deprecated.
@DavideD
Copy link
Member

DavideD commented Nov 6, 2025

Thanks @dreab8

I don't know why, but the test fails for MariaDB.

I don't know if I want to add back this kind of parameter processing. We worked hard to remove it in the past.
Maybe we should wait until we think some better solution.

I will have a better look at it later, though. I'm working on some other things at the moment

@dreab8 dreab8 changed the title Issue#2412 2 PostgreSQL: Mutation query with Joined Inheritance for databases supporting Global Temporary issue with transactions Nov 6, 2025
@dreab8
Copy link
Member Author

dreab8 commented Nov 6, 2025

@DavideD I checked and it fails on MariaDB because of a bug in ReactiveTableBasedDeleteHandler.
Going to create an issue for this.

#2737

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.

PostgreSQL: Mutation query with Joined Inheritance for databases supporting Global Temporary issue with transactions

2 participants