Ignore a Doctrine2 Entity when running schema-manager update

Based on the original alswer of ChrisR inspired in Marco Pivetta’s post I’m adding here the solution if you’re using Symfony2: Looks like Symfony2 doesn’t use the original Doctrine command at: \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand Instead it uses the one in the bundle: \Doctrine\Bundle\DoctrineBundle\Command\Proxy\UpdateSchemaDoctrineCommand So basically that is the class that must be extended, ending up in having: … Read more

The differences between GeneratedValue strategies

Check the latest doctrine documentation Here is a summary : the list of possible generation strategies: AUTO (default): Tells Doctrine to pick the strategy that is preferred by the used database platform. The preferred strategies are IDENTITY for MySQL, SQLite and MsSQL and SEQUENCE for Oracle and PostgreSQL. This strategy provides full portability. SEQUENCE: Tells … Read more

Auto quote reserved words with Doctrine 2

This was an issue I raised a while back with the Doctrine team. https://github.com/doctrine/doctrine2/issues/2409 The ticket was closed with the comment: You have to manually escape characters with @Column(name=”`integer`”) So I guess you’d need to deal with any reserved keywords in your annotations