Category: Spring Data


Java JPA entities with a JSON field featured image

Creating Java JPA entities with a JSON field

1. Introduction

In this tutorial we will explore how you can persist a JSON field in your JPA entity. We use a number of technologies:
  • Spring Data JPA
  • Spring Data REST
  • Hibernate ORM
  • Jackson
  • PostgreSQL
As always, the code used in the article is available on GitHub here. This article is focused on storing a JSON field in a JPA entity. If you would like to see how to store an XML field - check out this article here.

2. Our Goal

Our goal is to be able to...

Continue Reading

Creating Java JPA entities with an XML field

Creating Java JPA entities with an XML field

1. Introduction

In this article we explore how you can store an XML field in your JPA entities. We use a number of technologies:
  • Spring Data
  • Hibernate ORM
  • JAXB
  • PostgreSQL
As always, all code used within the article is available on GitHub: here. If you would like to see how you can store a JSON field in a JPA entity check out the tutorial: here.

2. Our Goal

Our goal is to be able to perform create, read, update and delete (CRUD) operations on a JPA entity that contains a field which uses PostgreSQL's native XML column type. To illustrate how...

Continue Reading