mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Metadata export/load not working on subclass (xml/yaml format) #6240
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 @mastir on GitHub (May 22, 2019).
Bug Report
Metadata drivers unable to load metadatas exported via Doctrine\ORM\Tools\Export\Driver*Exporter for child classes.
Summary
Exporter tool exports all fields/ids/relations including parent class defined.
Metadata driver loads parent fields/ids/relations first and then throw "Duplicate definition" Exception.
How to reproduce
Exception
for xml
for yaml
Expected behavior
no exception thrown
@mastir commented on GitHub (May 22, 2019):
tested with php driver and it works, problem related to xml/yml drivers only.
@Ocramius commented on GitHub (May 27, 2019):
What's the dumped XML looking like?
@mastir commented on GitHub (May 28, 2019):
Content.A.xml
Content.B.xml
Content.A.dcm.yml
Content.B.dcm.yml
@Ocramius commented on GitHub (May 28, 2019):
I'd say the problem is of the exporter, since
<field name="title"/>appears twice in an inheritance there. The XML is indeed invalid.