Skip to content
Advertisement

Mapping one to one relationships in Spring Boot

I am trying to map a User with a certain Table in a one to one relationship.

JavaScript

This here is my code, id appreciate if u take a look at it:

User class:

JavaScript

The Table class:

JavaScript

Advertisement

Answer

You don’t mapped parent entity with child entity properly.In parent table object of CTable is currenTable and you mapped by with table.

Change:

JavaScript

To:

JavaScript
Advertisement