mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Weird XML associations error #5535
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 @szymach on GitHub (May 15, 2017).
Originally assigned to: @szymach on GitHub.
I have an XML file as follows:
which works fine, but when I switch the order of
one-to-manyandmany-to-onerelations in the file, I get an error:Here are my Doctrine-related packages:
Funny thing is, I have a file:
and it works perfectly fine.
@szymach commented on GitHub (May 19, 2017):
Some of you more keenly eyed may have noticed the different
xsi:schemaLocationvalues, but that is only due to my fiddling and trying to figure out what was wrong.Basically what happened is that I have basically copied
FSi\Bundle\ContentBlockBundle\Entity\TranslatableBlock\TranslatableFilesBlockTranslationmapping toFSi\Bundle\ContentBlockBundle\Entity\TranslatableBlock\TranslatableAccordionBlockTranslationand adjusted class/relation names and it broke for the latter, where the former have worked previously. I understand this may be due to schema enforcing order of nodes, but why does it sometimes work and sometimes not?@Ocramius commented on GitHub (May 20, 2017):
@szymach XSD validation is not enabled at all times: a full trace should show where the failure is happening, but the XML driver doesn't do validation on its own, if I recall correctly (it should, though)
@greg0ire commented on GitHub (Sep 25, 2017):
@Ocramius would something like #6728 be ok? Should I continue or is there something wrong with it?
@szymach commented on GitHub (Jan 26, 2018):
Yeah the was on our part, our library had a sneaky bug when it came to validating XMLs. Closing.