Symfony2:如何使用 PropelBundle 进行 pgsql 数据库逆向工程过程?

发布于 2024-12-04 00:29:40 字数 2229 浏览 0 评论 0原文

我已经成功地将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遗心遗梦遗幸福 2024-12-11 00:29:40

刚刚看到你的问题。

我建议您将 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文