1

In any @Query in a Spring Repository, IntelliJ inspection is highlighting NULL with a red underline, saying "Cannot resolve symbol 'NULL'". Note that changing the case to all lowercase doesn't to fix it. After checking similar posts I did ensure I have the JPA & Spring facets configured properly.

Note this isn't actually an issue at runtime or compile time; everything actually works fine. It's just annoying/distracting seeing the highlights in IntelliJ. Does anyone know how to resolve this, or why it is happening?

Below is a minimal example showing the issue.

example

I am using

  • IntelliJ Ultimate 2021.3.2
  • spring-data-jpa 2.3.4.RELEASE
  • openjdk 11
kagof
  • 460
  • 2
  • 8

1 Answers1

-2

Set the nativeQuery attribute to true, something like:

@Query(nativeQuery=true,value="")
Tyler2P
  • 2,182
  • 12
  • 17
  • 28