0

How to allow mapped fields in json response?

I have a entity with oneToMany mapping.

I am using spring boot. Want to return Whole object with mapped fields included in Json response created by @ResponseBody annotation.

Somehow @ResponseBody annotation ignoring mapped fields.

Please help me with this.

Thanks in advance

  • @ResponseBody wont ignore any field until unless in hibernate or if you are using another ORM is being marked for lazy loading i.e lazy-loading=true , Kindly debug and check if those values are present in your entity object after Database retrieval – Amit Kumar Lal Mar 26 '18 at 18:42
  • https://stackoverflow.com/questions/28646332/how-does-the-spring-responsebody-annotation-work-in-this-restful-application-ex this may help you – Amit Kumar Lal Mar 26 '18 at 18:43

0 Answers0