duandi1636 2010-07-17 04:07
浏览 44
已采纳

Doctrine 2沙箱中的错误

i am trying to get started with Doctrine 2. and i am reading their intro. i am stuck trying to run

D:\Projects\Websites\php\Doctrine\sandbox>doskey doctrine=php d:esourcelibrary\frameworks\doctrine\bin\doctrine.php $*

D:\Projects\Websites\php\Doctrine\sandbox>doctrine --version
Doctrine Command Line Interface version 2.0-DEV

// from here u can see that doctrine works ... i used doskey to shorten typing

D:\Projects\Websites\php\Doctrine\sandbox>doctrine orm:schema-tool:create ./entities

  [RuntimeException]
  Too many arguments.

orm:schema-tool:create [--dump-sql] [-h|--help] [-q|--quiet] [-v|--verbose] [-V|--version] [-a|--ansi] [-n|--no-interact
ion] command

D:\Projects\Websites\php\Doctrine\sandbox>

i thought this is more or less the exact same code as the tutorial?

UPDATE

i discovered that in the package download from http://www.doctrine-project.org/projects/orm/download the sand box dont even have the folders entities, yaml & xml folders! the one from SVN ... i think onlye had the DBAL package (i think, in Doctrine) and the rest in lib. the structure seems off ... thats really a unusable beta?

which beta download can i use to start learning Doctrine 2?

  • 写回答

2条回答 默认 最新

  • douzhaiyuan1731 2010-07-17 10:31
    关注

    It's a better idea to download it using git, because that will allow you to get your dependencies (dbal and common).

    git clone git://github.com/doctrine/doctrine2.git doctrine2-orm
    cd doctrine2-orm
    git submodule update --init
    

    But the actual problem you are having is that you're passing an argument to orm:schema-tool:create where it doesn't want one. It looks like this behaviour was changed resulting in out-of-date documentation.

    The following works for me:

    cd tools/sandbox
    ./doctrine orm:schema-tool:create
    

    Which outputs:

    Creating database schema...
    Database schema created successfully!
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?