Skip to content
Advertisement

My Spring JPA queries do not work with H2

This query below does not work and it generates me an exception

JavaScript
JavaScript

When I used the MySQL database, the query worked fine. But now that I am using the H2 database, it suddenly does not work. Why? How do I fix this?

Advertisement

Answer

It would be better to use JPA.

If you still wanna use nativeQuery, use like this:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement