Skip to content


DDC-2030: better way to detect class parents #2708

doctrinebot opened this Issue · 0 comments

2 participants


Jira issue originally created by user goetas:

Currently i'm heavy using doctrine to generate entities starting form database schema (aprox 500 tables with thousand of relations).

I'm trying to detect some inheritance cases, but there is a problem.

Doctrine always uses PHP class inheritance to detect entity hierarchy, but generating entities starting from database, i have not yet any php class.

There is a better way to detect entities hierarchy? Without php classes...
Mapping files should be self-sufficient, even without php files.

The practical case is:
in DatabaseDriver i'm trying to call $metadata->addDiscriminatorMapClass($name, $className) method, but it raises an exception if $classNam does not exists.

Even if i manualy create XML mapping files, and then i try to generate php entityes. There is the same problem. XmlDriver tries to call setDiscriminatorMap method that raises the same exception.

@beberlei beberlei was assigned by doctrinebot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.