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 MATLAB动图的问题
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名