symfony

SOLUTION: symfony 1.4 doctrine:generate-module error: The "xxxForm" form only accepts a "xxx" object

When trying to execute php symfony doctrine:generate-module frontend account Account I only got the following error (verbose output is at the end of this post.)

The "AccountForm" form only accepts a "Account" object.

This was driving me nuts. As it turns out it was all caused because I had a table named "form" in my database. Apparently this causes a classname conflict after code generation.

I revised my schema.yml to rename form to input_form and Form to InputForm.

Remember to clear your symfony cache!!

If your changes are not having an effect, be sure to clear your symfony cache!

php symfony cache:clear

You may also right-click on your project in the project explorer in Netbeans, and from the
Symfony context menu, select Clear Cache.