Skip to content

Consider convertible argument types in in JDBC query derivation#2249

Closed
wonderfulrosemari wants to merge 2 commits intospring-projects:mainfrom
wonderfulrosemari:gh-2059-query-derivation-converter
Closed

Consider convertible argument types in in JDBC query derivation#2249
wonderfulrosemari wants to merge 2 commits intospring-projects:mainfrom
wonderfulrosemari:gh-2059-query-derivation-converter

Conversation

@wonderfulrosemari
Copy link
Contributor

Closes #2059

Fix query-derivation validation so value objects with registered
Reading/Writing converters are treated as queryable simple properties.

Previously, repository methods like findAllByRef(CustomerRef ref) could fail
with Cannot query by nested entity: ref even when a custom write target was
configured.

Changes include:

  • passing JdbcConverter into JdbcQueryCreator.validate(...)

  • allowing entity-like leaf properties when a custom write target exists

  • adding regression coverage in PartTreeJdbcQueryUnitTests for converter-backed value objects

  • adding author headers in touched classes

  • You have read the Spring Data contribution guidelines.

  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.

  • You submit test cases (unit or integration tests) that back your changes.

  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Closes spring-projects#2059

Signed-off-by: wonderfulrosemari <whwlsgur1419@naver.com>
Signed-off-by: wonderfulrosemari <whwlsgur1419@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 4, 2026
mp911de pushed a commit that referenced this pull request Mar 9, 2026
Closes #2059
Original pull request: #2249

Signed-off-by: wonderfulrosemari <whwlsgur1419@naver.com>
mp911de added a commit that referenced this pull request Mar 9, 2026
Refine query creation exception. Reorder checks in validation to check the initial case and then the condition that must be met. Add integration test. Fix contributor name.

See #2059
Original pull request: #2249
@mp911de mp911de changed the title Handle converter-backed value objects in query derivation Consider convertible argument types in in JDBC query derivation Mar 9, 2026
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 9, 2026
@mp911de mp911de self-assigned this Mar 9, 2026
@mp911de mp911de added this to the 4.0.4 (2025.1.4) milestone Mar 9, 2026
mp911de pushed a commit that referenced this pull request Mar 9, 2026
Closes #2059
Original pull request: #2249

Signed-off-by: wonderfulrosemari <whwlsgur1419@naver.com>
mp911de added a commit that referenced this pull request Mar 9, 2026
Refine query creation exception. Reorder checks in validation to check the initial case and then the condition that must be met. Add integration test. Fix contributor name.

See #2059
Original pull request: #2249
@mp911de
Copy link
Member

mp911de commented Mar 9, 2026

Thank you for your contribution. That's merged, polished, and backported now.

@mp911de mp911de closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Query derivation not working for simple domain primitive with Reading/WritingConverter

3 participants