Hibernate HSQLDB ARRAY Type

Introduction

Inspired by this comment on my blog, I decided to write an article about implementing a custom Hibernate type to support HSQLDB ARRAY column types.

As previously explained, although Hibernate does not support database ARRAY column types by default, you can easily implement a custom Hibernate ArrayType. While the previous solution worked on PostgreSQL, in this article, you are going to see that it is fairly easy to adapt it to HSQLDB.

Continue reading “Hibernate HSQLDB ARRAY Type”

JPA Criteria API Bulk Update and Delete

Introduction

JPA Criteria API bulk update delete is a great feature that allows you do build bulk update and delete queries using the JPA 2.1 Criteria API support via CriteriaUpdate and CriteriaDelete.

Because one of our community members asked me on the Hibernate forum about this topic, I decided it is a good opportunity to write about this lesser-known JPA Criteria API feature.

Continue reading “JPA Criteria API Bulk Update and Delete”

Upgrading to WordPress.com Business Plan

Introduction

In this article, I’m going to explain why I took the decision of giving my blog and upgrade and why I chose the WordPress.com Business Plan.

When I started this blog, I chose WordPress.com because, compared to Blogger or other blogging services, it seemed a much more flexible alternative, especially in the long-run. Most web designers I knew were very familiar with WordPress, not to mention that it powers 25% of all Internet websites.

Four years, I’ve been using the Free Plan which, other than a Domain Name, it does not cost a dime. In the beginning, this was very convenient since I didn’t know what to expect from blogging. I was not sure if I was going to like it or stick to it.

Continue reading “Upgrading to WordPress.com Business Plan”

How to map JSON collections using JPA and Hibernate

Introduction

The open-source hibernate-types project allows you to map Java objects or Jackson JsonNode as JPA or Hibernate entity properties, and, thanks to our awesome contributors, we have added support for storing type-safe JSON collections.

In this article, you are going to see how to achieve this goal.

Continue reading “How to map JSON collections using JPA and Hibernate”

How to bootstrap JPA programmatically without the persistence.xml configuration file

Introduction

One of my Twitter followers asked me if there is any documentation for bootstrapping JPA programmatically so that we can replace the persistence.xml configuration file with a Java configuration:

Previously, I wrote an article about bootstrapping Hibernate without the persistence.xml, but that solution was based on the Hibernate-specific EntityManagerFactoryBuilderImpl.

In this article, I’m going to give you a solution that works with any JPA provider since it’s based on standard Java Persistence API.

Continue reading “How to bootstrap JPA programmatically without the persistence.xml configuration file”