Mot-clé - doctrine
Symfony - Doctrine: Use a fully UTF8
lundi, juillet 19 2010, 15:16 :: Coding
First, edit your config/databases.yml and add : [yml] all: doctrine: class: sfDoctrineDatabase param: dsn: mysql:socket=/var/run/mysqld/mysqld.sock;dbname=mydb username: mydb password: mypassword encoding: utf8... lire la suite
Doctrine: Howto bypass the SoftDelete
mardi, avril 6 2010, 18:06 :: Coding
For one of my projects I have to check if a record already exists in my database, deleted or not. The preDqlSelect looks like this : /** * Implement preDqlSelect() hook and add the deleted flag to all queries for which... lire la suite
Symfony: change the default type of your
mercredi, janvier 20 2010, 19:24 :: Coding
Hey, yes it's possible to change the default type of your primary keys with a simple configuration Open your config/databases.yml. It should looks like this : [yml] # You can find more information about this file on the... lire la suite
[Symfony] Overwrite a value in a form
lundi, novembre 30 2009, 13:41 :: Coding
It happen sometimes that you have to set/override a value within a form but without using a hidden field (that can be overridden) Here is a short solution to set the user id in the object we are going to save. Let's say... lire la suite
[Symfony] Load an sql dump within a task
lundi, novembre 30 2009, 13:21 :: Coding
I recently had a problem when loading fixtures in my symfony project. I was loading cities, about 37 000 of them, and the doctrine:data-load was extremly slow (about 5 minutes). I finally found a solution to load an sql... lire la suite
Display lastest dotclear posts in
samedi, juillet 4 2009, 13:58 :: Info
Here is a little tip to display the latest posts of your dotclear blog in your symfony website. Create a connection If your blog database is in an other database than symfony's one, you need to create a connection in the... lire la suite