-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: Annotation Option Checks Respect Entity Inheritance #454
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
Merged
xterao
merged 8 commits into
main
from
fix/annotation-option-check-when-using-a-parent-property
Sep 16, 2025
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fcfa9f4
Refactor DaoAnnotationOptionParameterCheckProcessor to use allFields …
xterao 7bfaaee
Enhance entity checks to traverse superclasses for entity and immutab…
xterao 93ebd3d
Add tests for annotation option parameter inspection with parent clas…
xterao 5cd0297
Update test case guidelines to include parent-child entity relationsh…
xterao 5db76d3
Allow only properties defined within the Entity class; treat properti…
xterao 8eaf34e
In the primitive type check, display the previous property’s type cor…
xterao 2d7f3c1
Refactor getMatchFields method for improved readability and maintaina…
xterao c428de9
Add support for mixed SQL annotation types in DAO interface
xterao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
48 changes: 48 additions & 0 deletions
48
...org/domaframework/doma/intellij/inspection/dao/AnnotationOptionParameterInspectionTest.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* | ||
| * Copyright Doma Tools Authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.domaframework.doma.intellij.inspection.dao | ||
|
|
||
| import org.domaframework.doma.intellij.DomaSqlTest | ||
| import kotlin.test.Ignore | ||
|
|
||
| /** | ||
| * Test class for annotation option parameter inspection. | ||
| * Tests include/exclude options with parent class properties. | ||
| */ | ||
| @Ignore | ||
| class AnnotationOptionParameterInspectionTest : DomaSqlTest() { | ||
| /** | ||
| * Since error highlight tags for annotation options cannot be set in the test data, verify manually. | ||
| * There are no automated test cases, so perform manual checks using the following as a reference. | ||
| * | ||
| * Here is an updated summary of the test case coverage based on the revised method documentation. This can be used as a test case overview document. | ||
| * Relation: [AnnotationOptionTestInValidDao] | ||
| * - Error check when specifying fields not defined in the parameter type with `include` option. | ||
| * - Error check when specifying fields not defined in the parameter type with `exclude` option. | ||
| * - Error check for specifying fields not defined in immutable Entity with `MultiInsert` (also for fields not defined in parameter type). | ||
| * - Error check for specifying fields not defined in mutable Entity with `MultiInsert`. | ||
| * - Error check for specifying fields not defined in the parameter type with batch annotations. | ||
| * - Error when ending with an embedded property. | ||
| * - Error when specifying incorrect properties in an embedded class. | ||
| * - Error check for invalid field specification in `Returning` option. | ||
| * - Error check for invalid field specification in `Returning` option for mutable Entity. | ||
| * - Error check for specifying fields not defined in embedded property. | ||
| * - Error when specifying further properties from a primitive type. | ||
| * - Error check for specifying parent class properties in subclass with `@Entity`. | ||
| * - Error check for specifying parent class properties in subclass without `@Entity`. | ||
| * - Error check for specifying fields from a parent class that is not an Entity. | ||
| */ | ||
| } |
94 changes: 0 additions & 94 deletions
94
...stData/src/main/java/doma/example/dao/inspection/option/AnnotationOptionTestDao_base.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.