Skip to content
Advertisement

Spring, Jpa : One To Many Error when the list contains values

I want to return a Profile Object in JSON containing a list of login details associated with a social network.

Everything works correctly when the “reseaux_sociaux” table is empty. For my status table I get my statuses in JSON format in my Profile object. However, when “reseaux_sociaux” contains values then I get the error below and my Profile object in JSON format is not returned…

(Logs)

https://cloudvyzor.com/logpad/?query&database=sandbox-7fb06b2c06f198a7c0e4ff7c74d659e0

Profil Class

JavaScript

ReseauxSociaux Class

JavaScript

Reseau class

JavaScript

Profil Controller

JavaScript

Advertisement

Answer

I finally succeeded… The cause of the problem remains unclear but I have two hypotheses: the first is the use of capital letters on variable names; the second is the use of a list with the onetomany with the same name in two entities.

Profil class

JavaScript

ReseauxSociaux class

JavaScript

Reseau class

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement