title: Fatal error: Call to a member function persist() on a non-object
body: <p><code>Fatal error: Call to a member function persist() on a non-object</code></p>
  
  <p>I am using composer,mongodb doctrine,php</p>
  
  <pre><code>namespace Documents;
  
  public $document_id;
  public $id;
  public $model;
  public function __construct($model){
       $this-&gt;model = $model;
       $car = new Car('Ford');
       dm-&gt;persist($car);
       dm-&gt;flush();
       var_dump($car-&gt;__toString());
  </code></pre>