Wednesday, April 18, 2018

Native Queries: How to Call Native SQL Queries With JPA

DZone Database Zone
Native Queries: How to Call Native SQL Queries With JPA
Native Queries: How to Call Native SQL Queries With JPA

The Java Persistence Query Language (JPQL) is the most common way to query data from a database with JPA. But it supports only a small subset of the SQL standard and it also provides no support for database specific features.

So what should you do if you need to use a database-specific query feature or your DBA gives you a highly optimized query that cannot be transformed into JPQL? Just ignore it and do all the work in the Java code?

No comments:

Fun With SQL: Functions in Postgres

DZone Database Zone Fun With SQL: Functions in Postgres In our previous  Fun with SQL  post on the  Citus Data  blog, we covered w...