Writing JPQL Queries with Spring Data

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…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Donovan

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.