title: [Symfony\Component\Debug\Exception\ContextErrorException]
body: <p>I'm making fixtures and when I try to load them I have an error. The relationship between Award and Movie is unidirectional, so I load first Award because it hasn't any reference. The error says: </p>
  
  <pre><code>[Symfony\Component\Debug\Exception\ContextErrorException] Warning: spl_object_hash()
  expects parameter 1 to be object, array given in
  /Users/benatespina/Development/filmboot.web/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM‌/MongoDB/UnitOfWork.php line 1706.
  </code></pre>
  
  <p>This is my Fixture class:</p>
  
  <pre><code>namespace MyProject\MovieBundle\DataFixtures\MongoDB;
  
  use Doctrine\Common\DataFixtures\AbstractFixture;
  use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
  use Doctrine\Common\Persistence\ObjectManager;
  
  use MyProject\MovieBundle\Document\Award;
  
  class Awards extends AbstractFixture implements OrderedFixtureInterface {
      public function load(ObjectManager $manager) {
          $awards = array(
              array(
                  "name"     =&gt; "Sitges",
                  "year"     =&gt; "1992",
                  "category" =&gt; "Best director"
          );
  
          foreach ($awards as $i =&gt; $award) {
              $document = new Award();
              $document-&gt;setName    ($award["name"]);
              $document-&gt;setYear    ($award["year"]);
              $document-&gt;setCategory($award["category"]);
  
              $manager-&gt;persist($document);
              $this-&gt;addReference("award-" . $i, $award);
          }
  
          $manager-&gt;flush();
      }
  
      public function getOrder() {
          return 1;
      }
  }
  </code></pre>