DDC-1254: EntityGenerator does not respect Class Inheritance properly #1864

Closed
doctrinebot opened this Issue Jul 6, 2011 · 6 comments

2 participants

@doctrinebot

Jira issue originally created by user bigbadbassman:

Hi,
as mentioned here DDC-904, symfony/symfony#1550# and stof/StofDoctrineExtensionsBundle#47
The Doctrine2 EntityGenerator does not respect inheritance of Models correctly, especially when inheriting the primary field from an abstract base class as done by Symfony2's StofDoctrineExtensionsBundle.

This is extremly annoying since it renders the generator unusable when aforementioned bundle is active. It always fails with this message:

[Doctrine\ORM\Mapping\MappingException]

No identifier/primary key specified for Entity 'Stof\DoctrineExtensionsBundle\Entity\Translation'. Every Entity must have an
identifier/primary key.

DDC-904 mentioned this should be fixed, but this is not true: bug is still found in latest Symfony2 git.
The docs only refer to using a single mapping format inside a bundle, but this does not work. Stof... uses xml mappings and it does not matter if i use yml or annotiations in a different bundle - the above error is still present.

@doctrinebot

Comment created by venimus:

I already reported this issue, but it was not fixed http://www.doctrine-project.org/jira/browse/[DDC-1177](http://www.doctrine-project.org/jira/browse/DDC-1177)

@doctrinebot

Comment created by @beberlei:

Fixed

@venimius: You didn't say a word about EntityGenerator in your ticket, which was the critical information that helped me solve this issue.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by bigbadbassman:

THANKS!

@doctrinebot

Comment created by venimus:

@Benajmin, sorry but wasn't sure where is the problem i thought it might be me, that is why i simply stated that it is a schema-tool problem.

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.1.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment