Posted: August 20th, 2009 | Author: Marc | Filed under: easier | Tags: Doctrine, plugin, symfony 1.2, uvmcDoctrineTaskExtraPlugin | 4 Comments »
I just released another plugin for symfony 1.2! The plugin is named uvmcDoctrineTaskExtraPlugin and aims to provide some tasks to help you with Doctrine.
The task I created today is really simple but helps a lot when it comes to manage the files that doctrine created. I’m pretty sure you already had to delete all the models, forms, filters and table that doctrine generated because of a typo in your model’s name or because it suxxed. Well, now, thanks to this plugin, you’ll be able to do that in a second.
You simply have to run:
php symfony doctrine:delete-files-of-model myModelName
and it will automagically deletes every files related to this model.
Posted: August 12th, 2009 | Author: Marc | Filed under: powerful | Tags: plugin, search, solr, symfony 1.2, uvmcSolrSearchPlugin | 4 Comments »
Today I released my first plugin (yay!) for the symfony framework. It’s called uvmcSolrSearchPlugin and it permits you to integrate your solr search service within symfony, giving you the power of a real search engine in your website.
Read the rest of this entry »
Posted: July 10th, 2009 | Author: Marc | Filed under: easier | Tags: Doctrine 1.1, Exception, symfony 1.2, Tips | 2 Comments »
If Doctrine throw “Couldn’t get last insert identifier.” exception to your face, you might want to check the schema.yml of your table and change all your:
to
Here is an exemple:
THIS IS BAD:
1
2
3
4
5
6
7
8
| MyModel:
actAs:
Timestampable: ~
columns:
id:
type: int(4)
primary: true
autoincrement: true |
THIS IS GOOD:
1
2
3
4
5
6
7
8
| MyModel:
actAs:
Timestampable: ~
columns:
id:
type: integer(4)
primary: true
autoincrement: true |
This might solve your problem.
Posted: July 8th, 2009 | Author: Marc | Filed under: easier | Tags: Doctrine, symfony 1.2, Tips, UTF-8 | 5 Comments »
Maybe you already had the problem to deal with multiple collations in your database. You want to have utf8 by default but you’re too lazy to fix ALL your schema.yml?
Well, this solution is for you:
Just add this function in your ProjectConfiguration class in “/config/ProjectConfiguration.class.php”
1
2
3
4
5
| public function configureDoctrine(Doctrine_Manager $manager)
{
$manager->setCollate('utf8_unicode_ci');
$manager->setCharset('utf8');
} |
Next time you’ll do a:
php symfony doctrine:build-all-reload
Your tables will be encoded in UTF-8, even in the plugins! :)
Recent Comments