<p dir="auto">Here's my code and uses cases: <a href="https://gist.github.com/1018025">https://gist.github.com/1018025</a></p>
<p dir="auto">Basically I'm forced to do:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$em-&gt;persist($user);
foreach ($user-&gt;getAdvertisers() as $advertiser) {
    $advertiser-&gt;setUser($user);
    $em-&gt;persist($advertiser);
}
$em-&gt;flush();"><pre class="notranslate"><code class="notranslate">$em-&gt;persist($user);
foreach ($user-&gt;getAdvertisers() as $advertiser) {
    $advertiser-&gt;setUser($user);
    $em-&gt;persist($advertiser);
}
$em-&gt;flush();
</code></pre></div>
<p dir="auto">Instead of simply:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$em-&gt;persist($user);
$em-&gt;flush();"><pre class="notranslate"><code class="notranslate">$em-&gt;persist($user);
$em-&gt;flush();
</code></pre></div>
<p dir="auto">... even when I'm setting the cascade to persist.</p>
<p dir="auto">I'm able to do so in ManyToOne relations..</p>
<p dir="auto">IE. Each Advertiser can have multiple Offers.. so my OfferType is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public function buildForm(FormBuilder $builder, array $options)
{
    $builder
        -&gt;add('advertiser')
        -&gt;add('name')
        -&gt;add('postUrl')
        -&gt;add('dailyCap')
        -&gt;add('active');
}

public function getDefaultOptions(array $options)
{
    return array(
        'data_class' =&gt; 'ZGOffers\MainBundle\Entity\Offer'
    );
}"><pre class="notranslate"><code class="notranslate">public function buildForm(FormBuilder $builder, array $options)
{
    $builder
        -&gt;add('advertiser')
        -&gt;add('name')
        -&gt;add('postUrl')
        -&gt;add('dailyCap')
        -&gt;add('active');
}

public function getDefaultOptions(array $options)
{
    return array(
        'data_class' =&gt; 'ZGOffers\MainBundle\Entity\Offer'
    );
}
</code></pre></div>
<p dir="auto">This does what i expected it to -- create a form with a select of Advertisers, validating, then save:</p>
<p dir="auto">$em-&gt;persist($offer);<br>
$em-&gt;flush();</p>
<p dir="auto">instead of:</p>
<p dir="auto">$em-&gt;persist($offer);<br>
$advertiser = $offer-&gt;getAdvertiser();<br>
$em-&gt;persist($advertiser);<br>
$em-&gt;flush();</p>
<p dir="auto">Like I basically have to in my UserType form.</p>
<p dir="auto">Why don't the advertisers persist?</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/symfony/symfony/blob/2aa54b8cbd43fdbe9c2116afd2c47d50f7fa3c34/src/Symfony/Component/Finder/Finder.php#L635-L641">symfony/src/Symfony/Component/Finder/Finder.php</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 635 to 641
      in
      <a data-pjax="true" class="commit-tease-sha" href="/symfony/symfony/commit/2aa54b8cbd43fdbe9c2116afd2c47d50f7fa3c34">2aa54b8</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L635" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="635"></td>
          <td id="LC635" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (<span class="pl-smi"><span class="pl-k">static</span></span>::<span class="pl-c1">IGNORE_VCS_FILES</span> === (<span class="pl-smi"><span class="pl-k">static</span></span>::<span class="pl-c1">IGNORE_VCS_FILES</span> &amp; <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">ignore</span>)) { </td>
        </tr>

        <tr class="border-0">
          <td id="L636" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="636"></td>
          <td id="LC636" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">exclude</span> = array_merge(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">exclude</span>, <span class="pl-smi">self</span>::<span class="pl-s1"><span class="pl-c1">$</span>vcsPatterns</span>); </td>
        </tr>

        <tr class="border-0">
          <td id="L637" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="637"></td>
          <td id="LC637" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
        </tr>

        <tr class="border-0">
          <td id="L638" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="638"></td>
          <td id="LC638" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">  </td>
        </tr>

        <tr class="border-0">
          <td id="L639" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="639"></td>
          <td id="LC639" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (<span class="pl-smi"><span class="pl-k">static</span></span>::<span class="pl-c1">IGNORE_DOT_FILES</span> === (<span class="pl-smi"><span class="pl-k">static</span></span>::<span class="pl-c1">IGNORE_DOT_FILES</span> &amp; <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">ignore</span>)) { </td>
        </tr>

        <tr class="border-0">
          <td id="L640" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="640"></td>
          <td id="LC640" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">notPaths</span>[] = <span class="pl-s">'#(^|/)\..+(/|$)#'</span>; </td>
        </tr>

        <tr class="border-0">
          <td id="L641" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="641"></td>
          <td id="LC641" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Perhaps the above judgment should be moved here： LINE 562 ?</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/symfony/symfony/blob/2aa54b8cbd43fdbe9c2116afd2c47d50f7fa3c34/src/Symfony/Component/Finder/Finder.php#L559-L565">symfony/src/Symfony/Component/Finder/Finder.php</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 559 to 565
      in
      <a data-pjax="true" class="commit-tease-sha" href="/symfony/symfony/commit/2aa54b8cbd43fdbe9c2116afd2c47d50f7fa3c34">2aa54b8</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L559" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="559"></td>
          <td id="LC559" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (<span class="pl-c1">0</span> === count(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">dirs</span>) &amp;&amp; <span class="pl-c1">0</span> === count(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">iterators</span>)) { </td>
        </tr>

        <tr class="border-0">
          <td id="L560" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="560"></td>
          <td id="LC560" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">throw</span> <span class="pl-k">new</span> \<span class="pl-v">LogicException</span>(<span class="pl-s">'You must call one of in() or append() methods before iterating over a Finder.'</span>); </td>
        </tr>

        <tr class="border-0">
          <td id="L561" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="561"></td>
          <td id="LC561" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
        </tr>

        <tr class="border-0">
          <td id="L562" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="562"></td>
          <td id="LC562" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">  </td>
        </tr>

        <tr class="border-0">
          <td id="L563" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="563"></td>
          <td id="LC563" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (<span class="pl-c1">1</span> === count(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">dirs</span>) &amp;&amp; <span class="pl-c1">0</span> === count(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">iterators</span>)) { </td>
        </tr>

        <tr class="border-0">
          <td id="L564" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="564"></td>
          <td id="LC564" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">searchInDirectory</span>(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">dirs</span>[<span class="pl-c1">0</span>]); </td>
        </tr>

        <tr class="border-0">
          <td id="L565" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="565"></td>
          <td id="LC565" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>