我正在尝试开始学习Doctrine 2。我正在阅读他们的intro。我被困在奔跑中
D:\Projects\Websites\php\Doctrine\sandbox>doskey doctrine=php d:\resourcelibrary\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>我想这是不是和教程中的代码差不多?
更新
我发现在从http://www.doctrine-project.org/projects/orm/download下载的包中,沙盒甚至没有entities,yaml & xml文件夹!来自SVN的..。我认为只有DBAL包(我想,在Doctrine中),其余的都在lib中。这个结构看起来有点不对劲。这真的是一个不可用的测试版吗?
我可以使用哪个beta版下载来开始学习Doctrine 2?
发布于 2010-07-17 18:31:22
最好使用git下载它,因为这将允许您获得您的依赖项(dbal common)。
git clone git://github.com/doctrine/doctrine2.git doctrine2-orm
cd doctrine2-orm
git submodule update --init但是,您遇到的实际问题是,您向orm:schema-tool:create传递了一个它不需要的参数。看起来这个行为被改变了,导致文档过期。
下面的方法对我很有效:
cd tools/sandbox
./doctrine orm:schema-tool:create以下哪项输出:
Creating database schema...
Database schema created successfully!发布于 2010-07-17 12:45:02
你读过那个教程页面上的注释了吗?
The sandbox is only available via SVN or soon as a separate download on the downloads page.我从http://svn.github.com/doctrine/doctrine2.git上查看了它,它有完整的沙盒环境。
https://stackoverflow.com/questions/3270212
复制相似问题