mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-615: Single table inhertiance not working when base class is/starts-with "Module" #755
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (May 28, 2010).
Originally assigned to: @jwage on GitHub.
Jira issue originally created by user garrett:
While trying to get single table inheritance working we ran into the following: Single table inheritance works fine as long as the base class that's extended isn't named "Module" or doesn't start with "Module" (e.g. ModuleBase, Moduleabcdefg). Using any other file/class name not starting with "Module" works:
Running: php ./doctrine orm:schema-tool:create results in:
... change Module.php to SystemModule.php and extend that...everythings fine.
@doctrinebot commented on GitHub (May 29, 2010):
Comment created by romanb:
That sounds weird. Are you using Symfony (2) with Doctrine2Bundle? There is no specific treatment of classes with certain names within Doctrine that I can think of.
@doctrinebot commented on GitHub (Jun 1, 2010):
Comment created by garrett:
Seems weird to me to.
I'm using the version that gets included when downloading via:
... not sure how to determine the exact version. Looked for some files that might indicate the version in the Symfony directory (README, Version.txt, etc.) and none exist. Did a grep and that didn't produce any results either.
@doctrinebot commented on GitHub (Jun 2, 2010):
Comment created by @jwage:
Can you check your Doctrine/ORM/Version.php file?
@doctrinebot commented on GitHub (Jun 2, 2010):
Comment created by @jwage:
Also, did you try reproducing this in a simpler scenario? i.e. without Symfony? I tried creating a simple test here and I cannot reproduce anything so far.
@doctrinebot commented on GitHub (Jun 9, 2010):
Comment created by garrett:
Can you check your Doctrine/ORM/Version.php file?
Tried but that file doesn't exist for me. To make sure I was using the proper beta package I've started from scratch and downloaded Doctrine via http://www.doctrine-project.org/downloads/DoctrineORM-2.0.0-BETA1.tgz
The only Version.php file I found was Doctrine/Common/Version.php and the "VERSION" costants value is "2.0-DEV" (That's the same version that gets spit out using "php doctrine -V")
Also, did you try reproducing this in a simpler scenario? i.e. without Symfony?
Yes. And everything worked. I used the SchemaTool class and didn't have any issues.
New Issues
After starting over using the files located at the URL above the problem still exists however it's changed slightly. I still can't extend a class using another class located in a different file (same namespace). If I place both classes in the same file then the cli works. However, unlike my original post it's no longer limited to classes named "Module"; all class names fail now.
Just to make sure I had a clean version of Symfony I grabbed the latest from http://svn.symfony-project.com/branches/2.0 (Rev 29773) and nothing changed..same error.
Not sure if it will help but here's a stack trace:```
... I haven't changed the original Entities at all, they are still as described above.
@doctrinebot commented on GitHub (Jun 15, 2010):
Comment created by garrett:
Closing this due to my inability to reproduce on any other installation other than the original install this bug was found on.
@doctrinebot commented on GitHub (Jun 15, 2010):
Issue was closed with resolution "Cannot Reproduce"