我已经成功地将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[="..."]]
答案 0 :(得分:0)
刚看到你的问题。
我建议您将Propel和PropelBundle同时更新为Propel ORM组织的最新版本:http://github.com/propelorm。