Skip to content

Two new changes introduced in version 4.23.0 RELEASE (1.55) is generating false positive errors #1274

Closed

Description

@familygw

Hello,

I am experiencing an issue with the latest update to Spring Boot, specifically with the new features introduced for syntax validation and highlighting in Visual Studio Code. The features in question are:

Syntax validation for JPQL, SQL, and HQL embedded in Java code.
Syntax highlighting for SQL embedded into Spring Data query annotations.

Since these features were introduced, I've encountered numerous false positives where valid queries are being flagged as errors. This issue seems to primarily affect the development environment in Visual Studio Code.

Steps to Reproduce:
Write a valid SQL/JPQL query embedded within Java code or Spring Data annotations.
Observe that the syntax validation incorrectly flags these valid queries as having errors.
image

image

Expected Behavior:
The syntax validation should accurately recognize valid SQL, JPQL, and HQL queries without flagging them as errors.

Actual Behavior:
Valid queries are being incorrectly flagged as errors, leading to unnecessary confusion and hindrance in the development process.

Could you please look into this issue? It seems that the new validation rules might be overly strict or not fully aligned with the actual syntax rules of SQL, JPQL, and HQL.

Activity

  1. BoykoAlex commented on Jun 14, 2024

    @BoykoAlex
    Contributor

    See #1236 (comment) to workaround the issue for now.

    We are working on the patch release for early next week. Sorry for the inconvenience

  2. BoykoAlex commented on Jun 14, 2024

    @BoykoAlex
    Contributor

    @familygw do you mind showing issues with HQL and JPQL? I'm only seeing SQL so far... we can switch off SQL validation by default... wonder if HQL and JPQL need to be switched off by default as well...

  3. familygw commented on Jun 14, 2024

    @familygw
    Author

    @BoykoAlex, I performed a downgrade and then updated the component again. Now, I'm only seeing SQL-related errors, with no more HQL errors. I don’t remember seeing any related to JPQL; almost all of them are for SQL (native) queries.

    Which setting can I use to disable this validation in the meantime?

  4. BoykoAlex commented on Jun 14, 2024

    @BoykoAlex
    Contributor

    @familygw you'd need to use an nightly update site and then look at Settings Spring -> Validation -> Data Query. See #1236 (comment) for list of nightly build update sites and the setting page screenshot.

  5. added this to the 4.23.1.RELEASE milestone on Jun 15, 2024
  6. BoykoAlex commented on Jun 15, 2024

    @BoykoAlex
    Contributor

    Fixed for 4.23.1 which should come out early next week

  7. added
    for: eclipse
    for: vscode
    and removed on Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: eclipsefor: vscodetheme: spring-data-supporttheme: validationtype: bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions