diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index a0c6c1f21..5066bb200 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -194,7 +194,7 @@ class SchemaTool if (isset($class->primaryTable['indexes'])) { foreach ($class->primaryTable['indexes'] AS $indexName => $indexData) { - $table->addIndex($indexData, $indexName); + $table->addIndex($indexData['columns'], $indexName); } } diff --git a/tests/Doctrine/Tests/Models/ECommerce/ECommerceProduct.php b/tests/Doctrine/Tests/Models/ECommerce/ECommerceProduct.php index e4141822a..40fe67bd8 100644 --- a/tests/Doctrine/Tests/Models/ECommerce/ECommerceProduct.php +++ b/tests/Doctrine/Tests/Models/ECommerce/ECommerceProduct.php @@ -10,7 +10,7 @@ use Doctrine\Common\Collections\ArrayCollection; * * @author Giorgio Sironi * @Entity - * @Table(name="ecommerce_products") + * @Table(name="ecommerce_products",indexes={@index(name="name_idx", columns={"name"})}) */ class ECommerceProduct {