May
24
Symfony quickies 1
Filed Under Programming, Symfony | 2 Comments
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…;)).
Read more