Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDC-1204: Single Table Inheritance - Columns of one hierarchy are dropped #1810

Closed
doctrinebot opened this issue Jun 13, 2011 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@doctrinebot
Copy link

Jira issue originally created by user johannes:

In the following example, the columns of the classes B, C, D are not in the database schema. Only those of the classes A and E.

/****
 * @ORM\Entity
 * @ORM\Table(name = "a")
 * @ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT")
 * @ORM\InheritanceType("SINGLE_TABLE")
 * @ORM\DiscriminatorColumn(name="type", type="string", length=20)
 * @ORM\DiscriminatorMap({
 *     "c"   = "C",
 *     "d"   = "D",
 *     "e"   = "E"
 * })
 */
abstract class A { }

/****
 * @ORM\Entity
 */
abstract class B extends A { }

/****
 * @ORM\Entity
 */
class C extends B { }

/****
 * @ORM\Entity
 */
class D extends B { }

/****
 * @ORM\Entity
 */
class E extends A { }
@doctrinebot
Copy link
Author

Comment created by johannes:

The problem here is that class B is not part of the discriminator map which was necessary due to issue #DDC-1203. So, once that is resolved this can likely be closed as well.

@doctrinebot
Copy link
Author

Comment created by @beberlei:

Fixed

@doctrinebot
Copy link
Author

Issue was closed with resolution "Fixed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants