symfony - 有沒有doctrine yaml定義資料庫shema的比較詳盡的文件?
伊谢尔伦
伊谢尔伦 2017-05-16 16:45:27
0
1
508

例如symfony2中的例子:

Ens\JobeetBundle\Entity\CategoryAffiliate:
  type: entity
  table: category_affiliate
  id:
    id:
      type: integer
      generator: { strategy: AUTO }
  manyToOne:
    category:
      targetEntity: Category
      inversedBy: category_affiliates
      joinColumn:
        name: category_id
        referencedColumnName: id
    affiliate:
      targetEntity: Affiliate
      inversedBy: category_affiliates
      joinColumn:
        name: affiliate_id
        referencedColumnName: id

比較詳盡的解釋如generator這個option,以及manyToOne和OneToMany的option的文檔
doctrine官網我找到的並不太清楚

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回覆(1)
给我你的怀抱

http://docs.doctrine-project.org/en/l...

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!