How to generate entities from database schema using doctrine-orm-module and zf2

前端 未结 3 500
情深已故
情深已故 2021-01-31 19:15

I am using \"doctrine/doctrine-orm-module\": \"0.7.0\" with ZF2.

Once I create Entities I usually run following commands to sync and generate database automatically acco

3条回答
  •  一向
    一向 (楼主)
    2021-01-31 19:51

    We use a batch script:

    @ECHO OFF
    
    mkdir EXPORT
    call .\vendor\bin\doctrine-module orm:convert-mapping --force --from-database annotation ./EXPORT/
    call .\vendor\bin\doctrine-module orm:generate-entities ./EXPORT/ --generate-annotations=true
    
    pause 
    

    orm:convert-mapping and orm:generate-entities is probably what you are looking for.

提交回复
热议问题