schmittjoh/JMSSerializerBundle — pull request #157 by zachbadgett (2012-08-02 23:55:01+00:00)
Title: Feature to allow child objects to choose which fields to display from their parent.

This can come in handy when you want to serialize an object that has a parent but only want to display certain fields that differ from the parents' policies. An example:

```php

/**
* @ORM\ManyToOne(targetEntity="Parent", inversedBy="child")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
*
* @JMS\SerializedName("parent_id")
* @JMS\MapFields({"id"})
*/
protected $parent;

```
The code above would produce an output with one of the child's values being parent_id:. If multiple fields are given you would see parent_id: { id: , field: }.