Skip to content
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

Avoid double-conversion of values considered simple. #1830

Closed
wants to merge 1 commit into from

Conversation

odrotbohm
Copy link
Member

MappingJdbcConverter previously tried to create a JdbcValue for simple values via the ConversionService, only to drop the conversion result if the conversion did not result in a JdbcValue eventually. In that case, it triggered an additional (same) conversion to then handle the wrapping of the conversion result into a JdbcValue manually.

This commit alters the flow so that it only triggers the conversion once and manually applies the JdbcValue wrapping only if the result of the original conversion is not a JdbcValue yet.

MappingJdbcConverter previously tried to create a JdbcValue for simple values via the ConversionService, only to drop the conversion result if the conversino did not result in a JdbcValue eventually. In that case it triggered an additional (same) conversion to then handle the wrapping of the conversion result into a JdbcValue manually.

This commit alters the flow so that it only triggers the conversion once and manually applies the JdbcValue wrapping only if the result of the original conversion is not a JdbcValue, yet.
schauder pushed a commit that referenced this pull request Jul 9, 2024
MappingJdbcConverter previously tried to create a JdbcValue for simple values via the ConversionService, only to drop the conversion result if the conversino did not result in a JdbcValue eventually. In that case it triggered an additional (same) conversion to then handle the wrapping of the conversion result into a JdbcValue manually.

This commit alters the flow so that it only triggers the conversion once and manually applies the JdbcValue wrapping only if the result of the original conversion is not a JdbcValue, yet.

Original pull request #1830
@schauder
Copy link
Contributor

schauder commented Jul 9, 2024

Thanks. Merged.

@schauder schauder closed this Jul 9, 2024
@schauder schauder self-assigned this Jul 9, 2024
@schauder schauder added this to the 3.4 M1 (2024.1.0) milestone Jul 9, 2024
@schauder schauder added the type: task A general task label Jul 9, 2024
@schauder schauder deleted the improvement/avoid-double-conversion branch July 18, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants