Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.0-BETA4
-
Fix Version/s: 2.0-RC1
-
Component/s: Mapping Drivers
-
Security Level: All
-
Labels:None
-
Environment:PHP 5.3, PDO_MYSQL
Description
If I have a class called AbstractPage, with this single table inheritance mapping linking to the folllowing classes (Page, Article, Review), then it works fine:
<discriminator-column name="discr" type="string" />
<discriminator-map>
<discriminator-mapping value="page" class="Page" />
<discriminator-mapping value="article" class="Article" />
<discriminator-mapping value="review" class="Review" />
</discriminator-map>
If however I rename the classes to the Zend framework format, within modules (Default_Model_AbstractPage, Default_Model_Page, Article_Model_Article, Article_Model_Review), then because Article is before Default, then the schema tool gets confused and throws an error - [Doctrine\DBAL\Schema\SchemaException] The table with name 'pages' already exists. Everything else is the same but the class names.
I have attached examples of this both working and nonworking with the different naming schemes. As you can see everything else is the same.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Roman S. Borschel [ romanb ] | Benjamin Eberlei [ beberlei ] |
| Fix Version/s | 2.0-RC1 [ 10091 ] | |
| Resolution | Duplicate [ 3 ] |
| Workflow | jira [ 11899 ] | jira-feedback [ 14573 ] |
| Workflow | jira-feedback [ 14573 ] | jira-feedback2 [ 16437 ] |
| Workflow | jira-feedback2 [ 16437 ] | jira-feedback3 [ 18690 ] |
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-796, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
if yo uspecify class="page" the class has to be called Page, not Default_Model_Page. You have to change the mapping to:
You cannot re-use the mapping for different classes, it has to be bound specifically to an exisiting class.