Doctrine 2 with multiple indexes

后端 未结 2 879
旧巷少年郎
旧巷少年郎 2021-02-02 10:07

I am developing using zend framework and doctrine2.1.

I have generated entities from database.

But the problem is: Doctrine doesn\'t recognize my indexes. They

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-02 10:52

    I would say you can insert multiple indexes in the indexes property (but I haven't had the time to test it):

    indexes={
    @ORM\Index(name="index_name", columns={"database_column1","database_column2"}),
    @ORM\Index(name="index_name2", columns={"database_column1"}),
    @ORM\Index(name="index_name3", columns={"database_column2"})
    }
    

    Hope this helps you

提交回复
热议问题