title: Using YAML to define one to many relationship
body: <p>I undertake a project where mapping for doctrine was based on YAML.</p>
  
  <p>I need to create one to many  relationship between two entities: Post and Image (a post can have zero or any number of images).</p>
  
  <p><strong>under Post.orm.yml:</strong></p>
  
  <pre><code>TEST\Bundle\BlogBundle\Entity\Post:
      type: entity
      table: null
      fields:
          id:
              type: integer
              id: true
              generator:
                  strategy: AUTO
          postUserId:
              type: integer
              column: post_user_id
          postDate:
              type: datetime
              column: post_date
          postContent:
              type: text
              column: post_content
          postTitle:
              type: string
              length: 255
              column: post_title
          commentStatus:
              type: boolean
              column: comment_status   
      oneToMany:
         images:
           targetEntity: Image
           mappedBy: pos
      lifecycleCallbacks: {  }
  </code></pre>
  
  <p><strong>under Image.orm.yml</strong>:</p>
  
  <pre><code>TEST\Bundle\BlogBundle\Entity\Image:
      type: entity
      table: null
      fields:
          id:
              type: integer
              id: true
              generator:
                  strategy: AUTO
          filePersistencePath:
              type: string
          subDir:
              type: string
      manyToOne:
        pos:
          targetEntity: Post
          inversedBy: images
        joinColumn:
          referencedColumnName: id
  
      lifecycleCallbacks: {  }
  </code></pre>
  
  <p><strong>probelm:</strong>
  when I update database schema, I get the following error:</p>
  
  <pre><code> [Symfony\Component\Debug\Exception\ContextErrorException]
   Notice: Undefined index: targetEntity in C:\xampp\htdocs\bghitn\vendor\doct
   rine\orm\lib\Doctrine\ORM\Mapping\Driver\YamlDriver.php line 399
  </code></pre>
  
  <p>I don't understand this message. Your help is always appreciated.</p>
  
  <p><strong>Edit:</strong> This is the result of updating schema with --dump-sql</p>
  
  <pre><code>C:\xampp\htdocs\bghitn&gt;php app/console doctrine:schema:update --dump-sql
  ALTER TABLE image ADD CONSTRAINT FK_C53D045F4B89032C FOREIGN KEY (post_id) REFER
  ENCES post (id);
  CREATE INDEX IDX_C53D045F4B89032C ON image (post_id)
  </code></pre>