Skip to content
Advertisement

Tag: spring-boot-jpa

One to One relationship mapping JPA SpringBoot implementation error: ids for this class must be manually assigned before calling save()

I am trying to understand the JPA Spring Boot implementation for One-to-One mapping classes and was hoping if anyone could provide me a clear picture. One to One mapping Scenario: Table foo and Table childfoo Foo has the columns foo_id,foo_name, foo_place childfoo has the columnd foo_id(foreignkey of foo table), childfoo_name Here is the JPA entity implementation I’ve made so far:

Convert to DTO from join selection

I have these two tables And I am using this query to get the results So far this is the only way I could retrieve the results and actually use them later. To use them I am using this code currently But using it that way seems odd to me. Is there a better way to directly map the result

Advertisement