May
24
Symfony quickies 1
Filed Under Programming, Symfony
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.
Comments
2 Responses to “Symfony quickies 1”
Leave a Reply








Wow, old-fashioned schema.xml usage!
Yeah, I know. I just hate pre-defined indentation.