I’m using the symfony plugin “sfMultipleAjaxUploadGalleryPlugin“, and I would like to modify it’s model.
I want to change the “Photo” class, removing the field “title” and adding the fields “description_fr” and “description_en”.
I’ve made the changes in phpmyadmin, and, in the plugin, I’ve edited the schema, and the models, filters, and forms to reflect the changes.
I’ve emptied the cache, but I get doctrine errors concerning the new fields. This plugin is like the admin generator, it extends the class “autosomething”, created in the cache at runtime.
Any ideas ? Where else could the photos’ model be defined ?
Since it is in the plugins/ folder, I can’t just recreate everything using the command-line client.
I am afraid the changes in phpMyAdmin are completely useless, since once you will do a build everything in the database will be managed by symfony itself.
You should first make the wanted changes in the schema, then adjust the relevant classes
in the model
sf_plugin_dir/sfMultipleAjaxUploadGalleryPlugin/lib/model/doctrine/Photo.class.phpandsf_plugin_dir/sfMultipleAjaxUploadGalleryPlugin/lib/model/doctrine/PhotoTable.class.php,in the form
sf_plugin_dir/sfMultipleAjaxUploadGalleryPlugin/lib/form/doctrine/PhotoForm.class.phpand possibly in the filters
sf_plugin_dir/sfMultipleAjaxUploadGalleryPlugin/lib/filter/doctrine/PhotoFormFilter.class.phpand check also possible helpers
in
sf_plugin_dir/sfMultipleAjaxUploadGalleryPlugin/lib/helper/.Then you should check every action/template using the changed Photo model (if any) and adjust accordingly.
Finally empty the cache
be sure the changes are reflected in all the model classes (not really important, but still)
rebuild everything
it should work now.