I don’t see the point of using an SQL like language instead of actual SQL unless you need to support multiple different RDBMSs.
Re:ORMs Are Backwards
by steve_taylor on Wednesday September 04, 2019 @06:41AM
(#20875801)
One of the nicer JPQL features is being able to navigate the Java object model and have that translated to the equivalent joins in SQL.
However, there are things that JPQL can’t do, but it’s easy enough to create a native SQL query and have its results map to JPA entities. I use Spring Boot (JPA, Spring Data, Spring Data REST) for the sheer convenience of it and speed of development, not to abstract away the database, which is always PostgreSQL. I am very comfortable writing SQL queries and making use of PostgreSQL-specific features and Spring Boot with JPA certainly lets me do that when I want to.
My favourite neglected feature is JPQL with constructor expressions, which lets you write queries in an SQL-like language, but in terms of objects rather than tables, which is slightly easier, and materialise results directly into objects of your choice.