Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented May 30, 2025

Modify the error message and add test cases for when a property is accessed on a primitive type during the field-access element definition check.

@xterao xterao self-assigned this May 30, 2025
@xterao xterao added the bug Something isn't working label May 30, 2025
@github-actions github-actions bot added the fix Bug fixes label May 30, 2025
@xterao xterao added this to the 0.8.1 Release milestone May 30, 2025
@xterao xterao linked an issue May 30, 2025 that may be closed by this pull request
@xterao xterao requested a review from Copilot May 30, 2025 02:43
Copy link
Contributor

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

Adds handling for primitive types in validation error messaging and corresponding tests

  • Introduces a fallback to use the type’s canonicalText when retrieving a parent class name
  • Adds a SQL test case for accessing a non-existent property on a primitive (boolean)

Reviewed Changes

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

File Description
src/test/testData/src/main/resources/META-INF/doma/example/dao/EmployeeSummaryDao/bindVariableForEntityAndNonEntityParentClass.sql Added a test case for property access on a primitive type
src/main/kotlin/org/domaframework/doma/intellij/common/sql/validator/result/ValidationPropertyResult.kt Fallback to type.canonicalText when parent class name is missing

@xterao xterao force-pushed the fix/add-message-condition-non-psitype branch from 6c4989c to fe6b7af Compare May 30, 2025 02:49
@xterao xterao force-pushed the fix/add-message-condition-non-psitype branch from fe6b7af to 42a29f1 Compare May 30, 2025 02:50
@xterao xterao merged commit 6815885 into main May 30, 2025
5 checks passed
@xterao xterao deleted the fix/add-message-condition-non-psitype branch May 30, 2025 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants