title: How to deactivate the cascading saving in Doctrine 2?
body: <p>I have Entities <code>Foo</code> and <code>Bar</code> with a bidirectional <code>ManyToOne</code> relationship:</p>
  
  <pre><code>/**
   * Foo
   *
   * @ORM\Table(
   *     name="foo",
   *     indexes={
   *         ...
   *     }
   * )
   * @ORM\Entity
   * @ORM\InheritanceType("JOINED")
   * @ORM\DiscriminatorColumn(name="type", type="string")
   * @ORM\DiscriminatorMap({
   *     ...
   * })
   */
  class Foo extends AbstractDataObject
  {
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer", nullable=false)
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="IDENTITY")
       */
      protected $id;
      /**
       * @var Bar
       *
       * @ORM\ManyToOne(targetEntity="Bar")
       * @ORM\JoinColumns({
       *   @ORM\JoinColumn(name="bar_id", referencedColumnName="id")
       * })
       */
      protected $bar;
      ...
  }
  
  /**
   * Bar
   *
   * @ORM\Table(name="bar")
   * @ORM\Entity
   */
  class Bar extends AbstractDataObject
  {
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer", nullable=false)
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="IDENTITY")
       */
      protected $id;
      /**
       * @var string
       *
       * @ORM\Column(name="name", type="string", length=50, nullable=false)
       */
      protected $name;
      ...
  }
  </code></pre>
  
  <p>When I now try to save a <code>Foo</code> entity like this:</p>
  
  <pre><code>$this-&gt;entityManager-&gt;persist($foo);
  $this-&gt;entityManager-&gt;flush();
  </code></pre>
  
  <p>I get a <code>Doctrine\ORM\ORMInvalidArgumentException</code>:</p>
  
  <pre><code>A new entity was found through the relationship 'MyNamespace\DataObject\Foo#bar' that was not configured to cascade persist operations for entity:
  MyNamespace\DataObject\Bar@000000006098ccff0000000068c23676.
  To solve this issue:
      Either explicitly call EntityManager#persist() on this unknown entity
      or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).
  If you cannot find out which entity causes the problem implement 'MyNamespace\DataObject\Bar#__toString()' to get a clue.
  </code></pre>
  
  <p>I don't want the <code>Foo#$bar</code> to be automatically saved with the <code>Foo</code>. Otherwise I would define the <code>@ManyToOne(..,cascade={"persist"})</code>.</p>
  
  <p><strong>Why does Doctrine save though there is no <code>cascade={"persist"}</code> defined?</strong></p>
  
  <p><strong>How to avoid this behavior and just save the top level entity (here: <code>Foo</code>) without its related entities?</strong></p>