相关疑难解决方法(0)

在Doctrine 2 ORM中命名关系?

如何使用YAML为多对一关系"region" 设置外键的名称(编辑:不是属性本身的名称)?

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
Run Code Online (Sandbox Code Playgroud)

yaml doctrine symfony doctrine-orm

7
推荐指数
1
解决办法
4406
查看次数

标签 统计

doctrine ×1

doctrine-orm ×1

symfony ×1

yaml ×1