Open
Description
I'd welcome a simple way to add index to a single column, some shorthand for this:
/**
* @ORM\Entity
* @ORM\Table(indexes={@Index(name="foo_idx", columns={"foo"})})
*/
class Foo
{
/** @ORM\Column(type="string") */
private $foo;
}
to be annotated directly with the column:
/** @ORM\Entity */
class Foo {
/** @ORM\Column(type="string", index=true) */
private $foo;
}
or in a similar way (like @Orm\Index for column). This is possible for unique indexes as Column(unique=true)
, so I think there should be similar annotation for non-unique indexes.
Any comments welcomed, I can eventually pull-request it if it makes sense for others too.