Par un détour à Yoda

{ }

recherche

Aller au contenu | Aller au menu | Aller à la recherche

Mot-clé - doctrine

Symfony - Doctrine: Use a fully UTF8

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

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

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

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

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

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