Tag: orm


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