JMSSerializerBundle: @Group not working on parent's parent class fields
<p>I'm using JMSSerializerBundle to serialize my symfony entities to JSON. I have the following class structure:
</p>

<pre class="lang-php prettyprint-override"><code>abstract class A {}
abstract class B extends A {}
class C extends B {}
</code></pre>

<p>Now I want to serialize an object of class <code>C</code>, so I define a new Group, let's say "example_group", and set the <code>@Groups</code> annotation like this:</p>

<pre class="lang-php prettyprint-override"><code>abstract class A {
    /**
     * @Groups({"example_group"})
     */
    private $a1;

    private $a2;
}

abstract class B extends A {
    /**
     * @Groups({"example_group"})
     */
    private $b1;

    private $b2;
}

class C extends B {
    /**
     * @Groups({"example_group"})
     */
    private $c1;
}
</code></pre>

<p>The resulting serialization contains not only the <code>C::c1</code> field, but also <code>B::b1</code>, but surprisingly NOT <code>A::a1</code>. Is this the expected behaviour? I need also <code>A::a1</code> to be included. How can I achieve that?</p>

<p>Thank you.</p>