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
  • 522
  • 2
  • 12

2 Answers2

0

Seems to basically be a non-issue in newer versions of Intellij.

kagof
  • 522
  • 2
  • 12
-3

Set the nativeQuery attribute to true, something like:

@Query(nativeQuery=true,value="")
Tyler2P
  • 2,324
  • 26
  • 22
  • 31