While writing my book I encountered a use case where I needed chart representation of data. I used JFreeChart to solve this problem and now I’ll show you some features how it goes.
With Java 8 there is a new date and time structure which was inspired from Joda-Time. It is far more better than the old and clumsy Date and Calendar constructs. Nevertheless, if you want to store the time in a database, you have to tinker a bit because currently there is no supported out-of-the-box solution.
In this article I present solutions how to persist Joda-Time constructs into your database with JPA 2 (JPA 2.0 and JPA 2.1).
Newly I came across a little problem with JPA 2.0 and table inheritance: what if we have a base entity and extend it to some other subclasses and use inheritance strategies? Does it work out of the box or do we need some configuration?
Well, in this article I’ll take a look at this problem with the Hibernate JPA 2.1 implementation.