Posts Tagged ‘symfony 1.4’
Symfony 1.4 – Doctrine and Multiple Database Connections
June 14th, 2011 / 2 Comments » / by Faizan
Symfony is one of the best PHP framework out there and provides great control over your code. It provides speed, security, ease of use and flexibility out of the box. But some times due to lack of documentation or outdated information on internet you get stuck in different issues for which even googling can’t help so you have to figure it out yourself. While working on a project I got stuck in an issue with multiple databases and Doctrine ORM. Suppose you are creating a web application where for each user of application there is a separate database stored on some different server, we call this Client database, while there is one Master database which stores user’s credentials and their Client database credentials. Now when user logs in we have to modify DSN (Data Source name) for client database depending on which user has logged in.
Symfony 1.4 – Doctrine Timestampable Behaviour
February 13th, 2010 / 13 Comments » / by Faizan
Recently Symfony released their LTS 1.4 branch. Unlike previous versions Symfony 1.4 comes with Doctrine as default ORM. If you have worked with Doctrine’s you will be familiar with its Timestampable behavior.
actAs: Timestampable: ~
Timestampable behavior automatically adds a created_at and updated_at column and automatically set the values when a record is inserted and updated. I mostly use Symfony Admin Generator to generate Backend. This behavior worked fined till Symfony 1.2, but in Symfony 1.3 / 1.4 for unknown reasons this behavior adds created_at and updated_at fields as required and their value must be filled during creation of new record in admin generator.
Recent Comments