Skip to content


DDC-2123: [GH-502] Fix for invalid 'double-ON' SQL generation with entity inheritance type JOINED. #2810

doctrinebot opened this Issue · 4 comments

2 participants


Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of gwis:

Url: #502


In SqlWalker::walkJoin(), SqlWalker::walkRangeVariableDeclaration() can be
called which may produce an 'ON' clause if the entity inheritance type is
JOINED. As walkJoin() may then produce another ON clause, this results in
invalid SQL (e.g. '... ON foo = bar ON (baz = quux) ...' when the inheritance
type is JOINED.

This adds a test and a fix for the problem, by checking for an inheritance type
of JOINED in walkJoin() and using AND instead of ON in the appropriate place.

It seems like this part of the code is begging to be refactored. This is my
first foray into Doctrine internals and can't see a way to do this without
stomping all over the rest of the code, but this section seems ripe for cleanup
by somebody who is familiar.


Comment created by @beberlei:

A related Github Pull-Request [GH-502] was closed


Comment created by @FabioBatSilva:

Merged : 7a89520


Issue was closed with resolution "Fixed"


Comment created by @doctrinebot:

A related Github Pull-Request [GH-502] was closed:

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.3.1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
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.