title: Simple index definition in Doctrine 2
body: <p>Is there a <em>simple</em> way to define a non-unique index over a column?</p>
  
  <p>When I define unique index, this is perfectly sufficient:</p>
  
  <pre><code>/** @ORM\Entity */
  class Foo {
      /** @ORM\Column(type="string", unique=true) */
      private $foo;
  }
  </code></pre>
  
  <p>However, for non-unique index, I need this bunch of boilerplate:</p>
  
  <pre><code>/**
   * @ORM\Entity
   * @ORM\Table(indexes={@Index(name="foo_idx", columns={"foo"})})
   */
  class Foo
  {
      /** @ORM\Column(type="string") */
      private $foo;
  }
  </code></pre>
  
  <p>I'd prefer something like <code>@ORM\Index</code> annotation on the single property, or <code>index=true</code> etc...</p>