Remove nested _embedded fields while using projections

167 views Asked by At

I have a working DAL based on JPA repositories. Now we decided to expose them as Data Rest service with Spring Data Rest. The migration was fine but I noticed that it produced a lot of additional queries to DB in order to retrieve some related objects.. I used projections to override such behavior but still have the issues.

The main question is why related objects are still being generated inside _embedded field in additional to fields which are described inside projections?? Such behavior adds unnecessary objects to JSON as well as additional queries to DB..

0

There are 0 answers