【发布时间】:2011-10-02 00:59:27
【问题描述】:
如何使用 YAML 为多对一关系“区域”设置外键名称(edit:不是属性本身的名称)?
SWA\TestBundle\Entity\Province:
type: entity
table: province
uniqueConstraints:
UNIQUE_PROVINCE_CODE:
columns: code
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
code:
type: integer
name:
type: string
length: 255
short_name:
type: string
length: 2
manyToOne:
region:
targetEntity: Region
inversedBy: provinces
【问题讨论】:
标签: symfony doctrine doctrine-orm yaml