Skip to content

Extend JpaParametersParameterAccessor to offer extractDate fuction #2859

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
wants to merge 2 commits into from

Conversation

gregturn
Copy link
Contributor

No description provided.

@gregturn gregturn requested review from schauder and mp911de March 14, 2023 20:10
@gregturn gregturn changed the title Only extract a TypedParameterValue when Hibernate is on the classpath. Extend JpaParametersParameterAccessor to offer extractDate fuction Mar 14, 2023
@gregturn gregturn force-pushed the issue/gh-2857 branch 5 times, most recently from 664b57a to e96e84c Compare March 14, 2023 22:17
This allows the Hibernate variant (HibernateJpaParametersParameterAccessor) to potentially unwrap TypedParameterValue.

Resolves #2857.
@gregturn
Copy link
Contributor Author

I know we discussed putting this inside PersistenceProvider. However, inside that method, we don't appear to have access to it. However, the JpaParametersParameterAccessor, we also have a HibernateJpaParametersParameterAccessor, which is served up from PersistenceProvider.

Hence, by adding an extractDate() function to JpaParametersParameterAccessor and overriding in the subclasses HibernateJpaParametersParameterAccessor, we can have a Hibernate-specific operation.

@schauder schauder linked an issue Mar 15, 2023 that may be closed by this pull request
@schauder schauder added this to the 3.0.4 (2022.0.4) milestone Mar 15, 2023
schauder pushed a commit that referenced this pull request Mar 15, 2023
This allows the Hibernate variant (HibernateJpaParametersParameterAccessor) to potentially unwrap TypedParameterValue.

Closes #2857
Original pull request #2859
schauder added a commit that referenced this pull request Mar 15, 2023
Renamed to unwrapDate to align with the changes from #2861.
Minor JavaDoc adjustments

See #2857
Original pull request #2859
schauder pushed a commit that referenced this pull request Mar 15, 2023
This allows the Hibernate variant (HibernateJpaParametersParameterAccessor) to potentially unwrap TypedParameterValue.

Closes #2857
Original pull request #2859
schauder added a commit that referenced this pull request Mar 15, 2023
Renamed to unwrapDate to align with the changes from #2861.
Minor JavaDoc adjustments

See #2857
Original pull request #2859
@schauder
Copy link
Contributor

That's polished, merged and back ported.

@schauder schauder closed this Mar 15, 2023
@schauder schauder deleted the issue/gh-2857 branch March 15, 2023 11:40
schauder added a commit that referenced this pull request Mar 15, 2023
Removed instanceof assert.

See #2857
Original pull request #2859
schauder added a commit that referenced this pull request Mar 15, 2023
Removed instanceof assert.

See #2857
Original pull request #2859
mp911de added a commit that referenced this pull request Mar 15, 2023
Reduce method visibility. Improve method naming. Avoid using var in production code.

See #2857
Original pull request #2859
mp911de added a commit that referenced this pull request Mar 15, 2023
Reduce method visibility. Improve method naming. Avoid using var in production code.

See #2857
Original pull request #2859
klajdipaja pushed a commit to klajdipaja/spring-data-jpa that referenced this pull request Mar 24, 2023
This allows the Hibernate variant (HibernateJpaParametersParameterAccessor) to potentially unwrap TypedParameterValue.

Closes spring-projects#2857
Original pull request spring-projects#2859
klajdipaja pushed a commit to klajdipaja/spring-data-jpa that referenced this pull request Mar 24, 2023
Renamed to unwrapDate to align with the changes from spring-projects#2861.
Minor JavaDoc adjustments

See spring-projects#2857
Original pull request spring-projects#2859
klajdipaja pushed a commit to klajdipaja/spring-data-jpa that referenced this pull request Mar 24, 2023
Removed instanceof assert.

See spring-projects#2857
Original pull request spring-projects#2859
klajdipaja pushed a commit to klajdipaja/spring-data-jpa that referenced this pull request Mar 24, 2023
Reduce method visibility. Improve method naming. Avoid using var in production code.

See spring-projects#2857
Original pull request spring-projects#2859
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.

NoClassDefFoundError TypedParameterValue when using eclipselink
2 participants