Customizing the Result of JPA Queries with Aggregation Functions 1. Overview While Spring Data JPA can abstract the creation of queries to retrieve entities from the database in specific situations, we sometimes need to customize our queries, such as when we add aggregation functions. In this tutorial, we’ll focus on… Continue Reading jpa-queries-custom-result-with-aggregation-functions

A Collection of Spring Tutorials Persistence REST Security Series Spring Hibernate JPA I started the REST Security project on GitHub to explore writing an elegant REST Services with the latest and greatest Spring had to offer. That was Spring 3.1 and now Spring 3.2, moving towards Spring 4.0 and 4.1.… Continue Reading this-is-not-your-fathers-spring-a-learning-project

Fixing the JPA error “java.lang.String cannot be cast to Ljava.lang.String;” 1. Introduction Of course, we’d never suppose that we can cast a String to a String array in Java: java.lang.String cannot be cast to [Ljava.lang.String; But, this turns out to be a common JPA error. In this quick tutorial, we’ll show how this comes… Continue Reading jpa-error-java-lang-string-cannot-be-cast