title: Getting an undefined id exception when using Doctrine 2.0
body: <p>Please see the code here: <a href="http://pastie.org/1092106" rel="nofollow noreferrer">http://pastie.org/1092106</a></p>
  
  <p>When I call the method createPost on Blog, I keep getting an exception, it reads as follows:</p>
  
  <pre><code>At line 474 in lib/Doctrine/ORM/Persisters/BasicEntityPersister.php - Undefined index: id
  </code></pre>
  
  <p>OH, and also... I regenerate $_SESSION['User'] on each page load, so the object isn't detached from the entity manager or anything like that.</p>
  
  <p>Here are the schemas Doctrine2 is envisioning:</p>
  
  <pre><code>Array (
      [0] =&gt; CREATE TABLE Note (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, text LONGTEXT NOT NULL, created DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE = InnoDB
      [1] =&gt; CREATE TABLE BlogPost (note_id INT NOT NULL, blog_name VARCHAR(255) NOT NULL, PRIMARY KEY(note_id, blog_name)) ENGINE = InnoDB
      [2] =&gt; CREATE TABLE User (email VARCHAR(95) NOT NULL, id INT NOT NULL, password VARCHAR(32) NOT NULL, alias VARCHAR(15) DEFAULT NULL, firstName VARCHAR(20) DEFAULT NULL, lastName VARCHAR(20) DEFAULT NULL, enabled TINYINT(1) NOT NULL, created DATETIME NOT NULL, UNIQUE INDEX User_id_uniq (id), PRIMARY KEY(email)) ENGINE = InnoDB
      [3] =&gt; ALTER TABLE Note ADD FOREIGN KEY (user_id) REFERENCES User(id)
      [4] =&gt; ALTER TABLE BlogPost ADD FOREIGN KEY (note_id) REFERENCES Note(id)
      [5] =&gt; ALTER TABLE BlogPost ADD FOREIGN KEY (blog_name) REFERENCES Blog(name)
  )
  </code></pre>
  
  <p>Hopefully someone can help!</p>