Archives


Master Symfony2 fundamentals

Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).
trainings.sensiolabs.com

Symfony hosting done right

ServerGrove, outstanding support at the right price for your Symfony hosting needs.
servergrove.com

L'audit Qualité par SensioLabs

200 points de contrôle de votre applicatif web.
audit.sensiolabs.com

gravatar
Doctrine gains symfony citizenship in 1.2
by Jonathan Wage – September 16, 2008 – 9 comments

Today, Doctrine gained its citizenship in symfony 1.2. The sfDoctrinePlugin was linked via externals and is now officially bundled with symfony. If you've been around for a while, you'll know that this was highly anticipated and is a long time coming. To celebrate, I'll give a short little tutorial on how you can get started using Doctrine in symfony. Read below if you're interested.

Getting Started

Update config/databases.yml

all:
  doctrine:
    class:          sfDoctrineDatabase
    param:
      dsn:          mysql://root@localhost/dbname

Create config/doctrine/user.yml

---
User:
  columns:
    username: string(255)
    password: string(255)

Create data/fixtures/user.yml

---
User:
  User_1:
    username: jwage
    password: changeme

Create application

./symfony generate:app frontend

Build everything

./symfony doctrine:build-all-reload frontend

Inspect database with DQL Query

./symfony doctrine:dql frontend "FROM User u"
>> doctrine  executing: "FROM User u" ()
>> doctrine    id: '1'
>> doctrine    username: jwage
>> doctrine    password: changeme

Your data fixtures are loaded and your User model is ready to be used in your application. Couldn't be any easier!

What is to come?

  1. Official Documentation. symfony + Doctrine book.
  2. New features
  3. Doctrine training sessions by sensio

Thanks to everyone who adopted Doctrine early and stood by the project through thick and thin. Without your dedication this would not be possible today. So, a big thanks goes out to the community.

Add a Comment

You must be connected to post a comment.

Comments RSS

  • gravatar
    #1 Klemens Ullmann said on the 2008/09/16 at 09:06
    Very good! I'm really looking forward to the 1.2 release.
  • gravatar
    #2 sta;xed said on the 2008/09/16 at 09:10
    Very good!
    We look forward to Release 1.2
  • gravatar
    #3 Fabian Spillner said on the 2008/09/16 at 11:16
    Great news! :-)
  • gravatar
    #4 Yannick said on the 2008/09/16 at 14:52
    Welcome aboard Doctrine
  • gravatar
    #5 David Stendardi said on the 2008/09/16 at 17:11
    It's a very good news for doctrine i discoverd doctrine with sfDoctrine 2 years ago, when it was maintened by chtito !
  • gravatar
    #6 Leon said on the 2008/09/17 at 14:40
    Congrats!

    Really looking forward to start working with Doctrine!
  • gravatar
    #7 Bao said on the 2008/09/18 at 09:38
    Good luck with Doctrine :)
  • gravatar
    #8 Sjoerd said on the 2008/09/23 at 08:15
    Excellent work! Also good to read the new book, it's what I needed. Keep up the good spirits!
  • gravatar
    #9 Rimpy said on the 2008/10/11 at 21:25
    Great news!, Was looking for such a big collaboration. Best of luck to Doctrine and symfony. keep it up.