views:

1534

answers:

4

How can I properly switch the newly installed Symfony 1.4 framework from Doctrine (that it is configured for by default) to Propel?

+3  A: 

If you create new (fresh) project...

symfony generate:project xxx --orm=Propel

The easiest thing :)

If you want to change existing project - you have to dig in configuration file and enable propel plugin.

Your configuration file should look similar to:

// config/ProjectConfiguration.class.php
public function setup()
{
  $this->enablePlugins('sfPropelPlugin');
  ...
}

(based on Symfony page, you should dig it next time - especially Practical Symfony)

Tomasz Struczyński
BTW, if you're starting new project, I **strongly** recommend Doctrine. It's better.
Tomasz Struczyński
I agree with Tomasz. Don't use Propel.
Priidik Vaikla
+1  A: 

Use Propel if you enjoy object-oriented syntax.

Jesse
+1  A: 

propel is much better, imo

user
+1  A: 

If you like chained object method calls that look like SQL statements, use Doctrine. If you like real objects that hide SQL, use Propel.

If you like creating criteria objects that then render themselves as WHERE clauses, use Propel. If you like creating WHERE clauses similar to SQL, use Doctrine.

You can use both at the same time, too. Not recommended, but if you use plugins like apostrophe that only use Doctrine, you might not have a choice.

notbrain
@notbrain thanks! yeah! correct.
Harish Kurup