IGNITE-28426 Fix bug preventing SqlDdlGenerator from converting value classes with nested pojos annotated with SqlQueryField#7912
Merged
Conversation
There was a problem hiding this comment.
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.populateQueryEntityto treat non-natively-supportedQueryEntityfield 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
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/IGNITE-28426
What was done: