When issuing symfony-propel-build-model and using sfGuardPlugin, some errors might appear.
Error: Attempt to set foreign key to nonexistent table, sf_guard_user!

Solution: The solution is very simple and involves changing the name of the database in the schema.xml to propel. Don’t worry, the database name will remain the one set in propel.ini, this is just to leverage the different xml files so that foreign keys can be processed.
The whole line should be:

<database name="propel" defaultIdMethod="native" noxsd="true"   package="lib.model">

If that doesn’t work, try changing the package from lib.model to plugins.sfGuardPlugin.lib.model (not recommended but if it does the work, why not…;)).

Error: No package found for database “propel” in schema.xml
Solution: Add package=”lib.model” to the above line.

Save and share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Mixx
  • Google
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Comments

2 Responses to “Symfony quickies 1”

  1. Stefan on May 26th, 2008 2:46 pm

    Wow, old-fashioned schema.xml usage! ;)

  2. Bogdan on May 26th, 2008 7:26 pm

    Yeah, I know. I just hate pre-defined indentation.

Leave a Reply




Advertisements