I am building a REST API using Symfony2, Doctrine, FOSRestBundle and JMSSerializer.
The issue I am having is when serializing my entities, the serializer pulls in any related entities. Eg for a task that is part of a story which is part of a board, so when serializing the task I get output that includes the story which includes the board, which then includes all other stories on the board.
Is there an easy way to limit this, and just include the foreignIds instead?