Skip to content

fix(ksp-codegen): recognize @QuerySupertype and @QueryEmbeddable in autodetect#1858

Open
kylequera wants to merge 1 commit into
OpenFeign:masterfrom
kylequera:fix/ksp-query-supertype-autodetect
Open

fix(ksp-codegen): recognize @QuerySupertype and @QueryEmbeddable in autodetect#1858
kylequera wants to merge 1 commit into
OpenFeign:masterfrom
kylequera:fix/ksp-query-supertype-autodetect

Conversation

@kylequera

Copy link
Copy Markdown
Contributor

Summary

  • Teach QueryModelType.autodetect() to recognize querydsl's own @QuerySupertype and @QueryEmbeddable annotations, matching the jakarta @MappedSuperclass / @Embeddable handling already present for KSP codegen.
  • Without this, a @QueryEntity class extending a @QuerySupertype base fails during KSP processing with Unable to resolve type of entity for <superclass fqn> and no Q classes are generated.
  • Add KSP integration regression tests for both inheritance and embeddable cases.

Fixes #1857

Test plan

  • ./mvnw -Dtoolchain.skip=true -Pdev -pl querydsl-tooling/querydsl-ksp-codegen test -Dtest=KspProcessorIntegrationTest,RenderTest (25 tests, all green locally on JDK 21)
  • CI ./mvnw -Pdev verify

Made with Cursor

…utodetect

QueryModelType.autodetect() only matched jakarta annotations for SUPERCLASS
and EMBEDDABLE models. A @QueryEntity class whose superclass is @QuerySupertype
failed with "Unable to resolve type of entity" during KSP codegen.

Fixes OpenFeign#1857

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant