Month: February 2019

JPA / Hibernate – Mapping One-to-One relationships

  In this tutorial, we will discuss how to map and configure One-to-One relationships in JPA and Hibernate.   What are One-To-One relationships?   One to One relationships in databases define the relationship between two different entities, where the first entity can be related to zero or one of the second entity. For example, a …


DataIntegrityViolationException & ConstraintViolationException- Managing JPA bidirectional relationships properly

Troubleshooting DataIntegrityViolationException,¬† PropertyValueException &¬†ConstraintViolationException – Managing JPA bidirectional relationships properly   In this troubleshooting guide, we will explore one of the most common causes of a DataIntegrityViolationException, a¬†ConstrainViolationException and a PropertyValueException. We will set up our database tables and our entity models in order to reproduce the exception, and then we will discuss how the …