Skip to content

IGNITE-28426 Fix bug preventing SqlDdlGenerator from converting value classes with nested pojos annotated with SqlQueryField#7912

Merged
isapego merged 1 commit into
apache:mainfrom
tmgodinho:ignite-28426
Apr 13, 2026
Merged

IGNITE-28426 Fix bug preventing SqlDdlGenerator from converting value classes with nested pojos annotated with SqlQueryField#7912
isapego merged 1 commit into
apache:mainfrom
tmgodinho:ignite-28426

Conversation

@tmgodinho
Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/IGNITE-28426

What was done:

  • [] Fix bug preventing SqlDdlGenerator from converting value classes with nested pojos annotated with SqlQueryField

@tmgodinho tmgodinho marked this pull request as ready for review April 2, 2026 09:31
@isapego isapego requested a review from Copilot April 10, 2026 11:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an issue in the migration tools’ SQL DDL generation where value classes containing nested POJOs annotated with @QuerySqlField were not handled correctly during QueryEntity enrichment, preventing expected table definition generation.

Changes:

  • Add a regression test and a new test model covering a value class with an annotated nested POJO.
  • Adjust SqlDdlGenerator.populateQueryEntity to treat non-natively-supported QueryEntity field types as POJO-mapped and move them toward “extra fields” handling.
  • Expose TypeInspector.isPrimitiveType (with Javadoc) for cross-package reuse.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
migration-tools/modules/migration-tools-commons/src/test/java/org/apache/ignite/migrationtools/sql/sql/SqlDdlGeneratorTest.java Adds a parameterized regression test for nested annotated POJO handling.
migration-tools/modules/migration-tools-commons/src/main/java/org/apache/ignite/migrationtools/types/TypeInspector.java Makes isPrimitiveType public for use in SQL DDL generation logic.
migration-tools/modules/migration-tools-commons/src/main/java/org/apache/ignite/migrationtools/sql/SqlDdlGenerator.java Updates POJO detection and field handling logic during QueryEntity population.
migration-tools/modules/migration-tools-commons-tests/src/main/java/org/apache/ignite/migrationtools/tests/models/NestedPojoWithAnnotations.java Introduces a test model with @QuerySqlField on a primitive and a nested POJO field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

… classes with nested pojos annotated with SqlQueryField

** Added tests
@isapego isapego merged commit 02e7000 into apache:main Apr 13, 2026
5 checks passed
@tmgodinho tmgodinho deleted the ignite-28426 branch April 13, 2026 14:01
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.

3 participants