Skip to content

Improvements to clarify type using TypedParameterValue #2370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
heowc opened this issue Dec 1, 2021 · 1 comment
Closed

Improvements to clarify type using TypedParameterValue #2370

heowc opened this issue Dec 1, 2021 · 1 comment
Labels
type: enhancement A general enhancement

Comments

@heowc
Copy link
Contributor

heowc commented Dec 1, 2021

When using a native query, null value binding behaves differently depending on the SQL driver.
(For example, I faced the following issue with hibernate + postgres combination. - https://hibernate.atlassian.net/browse/HHH-14778)

But since we know the type when we write methods in JpaRepository, we can use TypedParameterValue (or otherwise) to clearly know the type of the parameter.

This issue is derived from #2366.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 1, 2021
@schauder schauder added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 6, 2021
@AndreasALoew
Copy link

I'd also like to see this happen very soon if possible, as otherwise we need to work around it large scale... :-(

See https://hibernate.atlassian.net/browse/HHH-14411 for more details...

schauder added a commit that referenced this issue Mar 10, 2022
Replaced type check by method providing the correct JpaParameterParameterAccessor.
Formatting.

See #2370
Original pull request #2461
schauder pushed a commit that referenced this issue Mar 10, 2022
This avoids problems where a JDBC driver fails to determine the correct type for such values.

Closes #2370
Original pull request #2461
schauder added a commit that referenced this issue Mar 10, 2022
Replaced type check by method providing the correct JpaParameterParameterAccessor.
Formatting.

See #2370
Original pull request #2461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants