Created
November 29, 2012 08:45
-
-
Save wjzijderveld/4167640 to your computer and use it in GitHub Desktop.
Doctrine: SingleTable Inheritance, ClassMetaData, APC problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'll try to explain: | |
We have ProductTaxonomyTerm and CategoryTaxonomyTerm, which both extend BaseTaxonomyTerm. | |
BaseTaxonomyTerm is configured with SingleTableInheritance with a discriminator column type. | |
Local env works without issues, but on our staging it sometimes happens, that the ClassMetaData is 'corrupt'. | |
The Base/Category (in this example) metadata looks fine (when I look at the value stored in APC), but the ProductTaxonomyTerm has no parentClasses defined anymore (in ClassMetadata). | |
Apache graceful (APC clear) solves the issue, but only half. The problem re-arises on another website (we have a mutli-site solution), which site it is, seems pure random. | |
The missing parentClasses causes, that Doctrine generates a faulty SQL query (empty WHERE IN()). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment