Deep clone Doctrine entity with related entities
You have to implement a __clone() method in your entities that sets the id to null and clones the relations if desired. Because if you keep the id in the related object it assumes that your new entity...
View ArticleAuto 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...
View ArticleThe 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...
View ArticleIgnore 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:...
View Article