Skip to content

Tag: one-to-many

Java JPA SpringBoot

I have table A and table B, table B have a fk that rererences to table A. class EntityA class EntityB But when i try to call findAll method from repository (from EntityA) i get: Could not write JSON: Infinite recursion Answer I’ve solved the problem using unidirectional relationship. Used this on my Ent…

One-to-many select in Jooq

I am trying out JOOQ and trying to select from 3 tables (Author, Books and Articles) using a join statement. The ERD is as follows: The query I have is the following: I also have a protobuf object as follows: (or any other pojo for that matter) which will hold all the entities (author details + list of books …