Php 使用symfony中的条令从yaml文件创建实体
我有一个symfony条令yaml文件,内容如下:Php 使用symfony中的条令从yaml文件创建实体,php,symfony,doctrine-orm,doctrine,Php,Symfony,Doctrine Orm,Doctrine,我有一个symfony条令yaml文件,内容如下: Symchat\SymchatBundle\Entity\Messages: type: entity table: messages id: id: type: integer scale: 0 length: null unique: false nullable: false
Symchat\SymchatBundle\Entity\Messages:
type: entity
table: messages
id:
id:
type: integer
scale: 0
length: null
unique: false
nullable: false
precision: 0
id: true
generator:
strategy: IDENTITY
fields:
message:
type: string
scale: 0
length: 250
unique: false
nullable: false
precision: 0
date:
type: datetime
scale: 0
length: null
unique: false
nullable: false
precision: 0
lifecycleCallbacks: { }
但是如何让symfony/doctor自动生成实体php文件呢
这看起来很简单,但一直在文件中循环寻找这个
我只想通过symfony读取doctrine文件并创建Messages.php实体类。
php应用程序/控制台生成:doctrine:entities-Symchat\SymchatBundle
不行!非常感谢你