Writing JPQL Queries with Spring Data

Queries created based on method name

Donovan

--

The JPA, Java Persistence API, gives us a query language, Java Persistence Query Language, JPQL. Since JPQL queries use entity classes and attributes, JPA gives us a Query interface that uses EntityManager to create queries that interact with the database.

There are three methods available to implement JPQL queries that fetch instances based on non primary key attributes; Query based on method name, using the ‘@Query’ annotation, using the ‘@NamedQuery’ annotation. This post will…

--

--

Donovan

Learning. Puttin up shots in Angular and Java and Python and anything else I get my hands on. Sights set on becoming a gainfully employed developer.