0

enter image description here

public String getVersion() {
            return (String) em.createNativeQuery("SELECT pkg_deploy.get_current_build FROM dual").getSingleResult();
        }

The Sonar complain about not using native queries. In this case, what do I need to change? Should I use JPQL, how?

Klajdi
  • 1

1 Answers1

0

Using native queries is perfectly fine and in some situations like yours the only way to run this query.

You should go ahead and adjust the SonarQube rules for your needs.

Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82