Symfony2:如何使用 PropelBundle 进行 pgsql 数据库逆向工程过程?
我已经成功地将 Symfony2 与 PropelBundle 集成,但我在使用 pgsql 实现逆向工程过程时遇到了麻烦部署在 posgresql-8.4 服务器中的数据库的驱动程序。为此,我运行了 php app/console propel:reverse
命令来生成 XML 架构,但出现以下错误:
[propel-schema-reverse] There was an error building XML from metadata:
SQLSTATE[42704]: Undefined object: 7
ERROR: unrecognized configuration parameter "tables"
有什么想法吗?我的工作站是 Ubuntu 10.10,完整过程的控制台日志是:
Use connection named default
Buildfile: /var/www/symfony2/vendor/propel/generator/build.xml
[resolvepath] Resolved /tmp/propel-gen to /tmp/propel-gen
propel-project-builder > check-project-or-dir-set:
propel-project-builder > check-project-set:
propel-project-builder > set-project-dir:
propel-project-builder > check-buildprops-exists:
propel-project-builder > check-buildprops-for-propel-gen:
propel-project-builder > check-buildprops:
propel-project-builder > configure:
[echo] Loading project-specific props from /tmp/propel-gen/build.properties
[property] Loading /tmp/propel-gen/build.properties
propel-project-builder > reverse:
[phing] Calling Buildfile '/var/www/symfony2/vendor/propel/generator/build-propel.xml' with target 'reverse'
[property] Loading /var/www/symfony2/vendor/propel/generator/./default.properties
propel > reverse:
[echo] +-----------------------------------------------+
[echo] | |
[echo] | Generating XML from PDO connection ! |
[echo] | |
[echo] +-----------------------------------------------+
[propel-schema-reverse] Reading database structure...
[propel-schema-reverse] There was an error building XML from metadata: SQLSTATE[42704]: Undefined object: 7 ERROR: unrecognized configuration parameter "tables"
BUILD FINISHED
Total time: 1.6386 second
[ErrorException]
Warning: copy(/tmp/propel-gen/schema.xml): failed to open stream: No such file or directory in /var/www/symfony2/vendor/symfony/src/Symfony/Component/HttpKernel/Util/Filesystem.php line 44
propel:reverse [--connection[="..."]]
I've successfully integrated Symfony2 with PropelBundle but I'm having troubles to realize a reverse engineering process with a pgsql driver over a database deployed in a posgresql-8.4 server. In order to do that I ran a php app/console propel:reverse
command to generate the XML schema and I obtained the following error:
[propel-schema-reverse] There was an error building XML from metadata:
SQLSTATE[42704]: Undefined object: 7
ERROR: unrecognized configuration parameter "tables"
Any ideas? My station is an Ubuntu 10.10 and the full process's console log was:
Use connection named default
Buildfile: /var/www/symfony2/vendor/propel/generator/build.xml
[resolvepath] Resolved /tmp/propel-gen to /tmp/propel-gen
propel-project-builder > check-project-or-dir-set:
propel-project-builder > check-project-set:
propel-project-builder > set-project-dir:
propel-project-builder > check-buildprops-exists:
propel-project-builder > check-buildprops-for-propel-gen:
propel-project-builder > check-buildprops:
propel-project-builder > configure:
[echo] Loading project-specific props from /tmp/propel-gen/build.properties
[property] Loading /tmp/propel-gen/build.properties
propel-project-builder > reverse:
[phing] Calling Buildfile '/var/www/symfony2/vendor/propel/generator/build-propel.xml' with target 'reverse'
[property] Loading /var/www/symfony2/vendor/propel/generator/./default.properties
propel > reverse:
[echo] +-----------------------------------------------+
[echo] | |
[echo] | Generating XML from PDO connection ! |
[echo] | |
[echo] +-----------------------------------------------+
[propel-schema-reverse] Reading database structure...
[propel-schema-reverse] There was an error building XML from metadata: SQLSTATE[42704]: Undefined object: 7 ERROR: unrecognized configuration parameter "tables"
BUILD FINISHED
Total time: 1.6386 second
[ErrorException]
Warning: copy(/tmp/propel-gen/schema.xml): failed to open stream: No such file or directory in /var/www/symfony2/vendor/symfony/src/Symfony/Component/HttpKernel/Util/Filesystem.php line 44
propel:reverse [--connection[="..."]]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
刚刚看到你的问题。
我建议您将 Propel 和 PropelBundle 更新到 Propel ORM 组织的最新版本:http://github.com/propelorm。
Just saw your question.
I recommend you to update both Propel and PropelBundle to last versions on the Propel ORM organization: http://github.com/propelorm.