Symfony2: How to make a pgsql database reverse enginering process with PropelBundle?

瘦欲@ 提交于 2019-12-11 05:09:44

问题


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[="..."]]

回答1:


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.



来源:https://stackoverflow.com/questions/7367077/symfony2-how-to-make-a-pgsql-database-reverse-enginering-process-with-propelbun

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!