0

I'm building this movie rental app and client has list called rentedMovies. If use PUT its gives me 200 code and everything seems fine, but if I reload my clients, its all messed up. If I use JasonIgnore, it's okay but how could see then what movies have client rented...

Here is the list enter image description here

Logic in service

enter image description here

Output in browser

enter image description here

Console output enter image description here

Movie class enter image description here

ErikVM
  • 17
  • 4
  • looks like you might a nested structure, can you add the Movie class and the table details if possible. – gvmani Jun 28 '22 at 04:44
  • Uploaded pic of a class. Still can’t figure out the problem. Tried to rewrite the code but still faulty, my knowledge is the problem :D – ErikVM Jun 28 '22 at 09:39
  • does your Client class refer to Movie ? Can you enable JSONIgnore for clients property and check ? – gvmani Jun 28 '22 at 10:22
  • If I enable JsonIgnore it works, but is there a way to do it without using that annotation? – ErikVM Jun 28 '22 at 13:12
  • 1
    See if https://stackoverflow.com/questions/17393812/json-and-java-circular-reference helps you out. – kendavidson Jun 28 '22 at 18:21

0 Answers0