Hibernate relationship

Software version that were used:

  1. Spring Boot 1.5.9

The error message that triggered all the research:

2017-12-08 18:02:48.438 UTC [73] ERROR: constraint "uk_n7c2qd0x7l2yaq2xyyvs21rej" of relation "software_suite_instance" does not exist
2017-12-08 18:02:48.438 UTC [73] STATEMENT: alter table public.software_suite_instance drop constraint UK_n7c2qd0x7l2yaq2xyyvs21rej

The code fix was to properly map in both entities the link between them.

In the child entity we needed to add a field for the parent entity like:

private ParentEntity parentEntity;

// Create a getter and setter for parentEntity

The error stopped showing up after this correction.

Published by


Java developper that loves photography and an excellent espresso

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s