Symfony Doctrine Models for Entity Without Primary Keys

前端 未结 2 1876
醉话见心
醉话见心 2021-01-14 09:10

I\'m working with a legacy database while re-building the web application. I want to use Symfony2.x which obviously has Doctrine as ORM.

I\'ve around 50 (mysql) tab

2条回答
  •  無奈伤痛
    2021-01-14 09:52

    Doctrine requires every entity class to have an identifier/primary key.

    Take a look at this page: http://www.doctrine-project.org/docs/orm/2.0/en/reference/basic-mapping.html#identifiers-primary-keys

提交回复
热议问题