Doctrine 2 Object Relational Mapper (ORM)
9e916a2893
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. |
||
---|---|---|
bin | ||
lib | ||
tests | ||
tools/sandbox | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
build.properties | ||
build.properties.dev | ||
build.xml | ||
composer.json | ||
doctrine-mapping.xsd | ||
LICENSE | ||
phpunit.xml.dist | ||
README.markdown | ||
run-all.sh | ||
UPGRADE.md |
Doctrine 2 ORM
Doctrine 2 is an object-relational mapper (ORM) for PHP 5.3.2+ that provides transparent persistence for PHP objects. It sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication.