Bytecode enhancement and toString
Last week, Mark Struberg, who is an Apache Software Foundation member and OpenJPA contributor, made the following statement:
Continue reading “The best way to implement equals, hashCode, and toString with JPA and Hibernate”
Flemming Harms has asked a very good question on Twitter:
Basically, we want to move the JPA XML mappings outside of the application JAR so that we can change the mapping without affecting the jar file.
Continue reading “How to use external XML mappings files (outside of JAR) with JPA and Hibernate”
One of my Twitter followers asked me to answer the following question on StackOverflow.
This article aims to explain various techniques for controlling the
UPDATE SQL statement that is executed whenever an entity is modified by the data access layer.
Continue reading “How to update only a subset of entity attributes using JPA and Hibernate”
StackOverflow is a neverending source of great questions. This time, we are covering this question about using Java 1.8
Optional with JPA and Hibernate.
Java 1.8 introduced the
java.util.Optional container object that may or may not contain a certain value. Combining
Optional and streams is very handy. Therefore, you might want that some nullable entity attributes be exposed as
This article is going to demonstrate what are caveats of using
Optional with entity attributes, and how you can overcome them.
Continue reading “The best way to map a Java 1.8 Optional entity attribute with JPA and Hibernate”
It’s been three years since I started this blog, and every year I happen to write a report. If you are curious, check out the previous reports:
In these three years, I got over 1.200.000 page views and the last month was the first one to break the 70.000 views threshold.
Continue reading “Three years of blogging”