New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix quoting issues related to ticket #6402 #6404
Conversation
Apply quoting strategy to foreign key columns of one-to-one relation so that correct select statements are generated. And use unquoted column names in result mapping instead of quoted ones, as consumers (namely IdentifierFlattener) expect unquoted column names.
Is there any way to rerun the Travis CI build? The mariadb problem looks to me like a transient error. |
@lemartin restarted, I'll also review your PR in a few hours 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After restarting the job twice it passed (quite odd tbh).
Besides of these small things it LGTM, any comment @Ocramius
<?php | ||
|
||
|
||
namespace Doctrine\Tests\ORM\Functional; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this test to Doctrine\Tests\ORM\Functional\Ticket
use Doctrine\Tests\Models\Quote\User; | ||
use Doctrine\Tests\OrmFunctionalTestCase; | ||
|
||
class QuoteTest extends OrmFunctionalTestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer to the ticket on the class name (e.g. GH6402Test
) also adding the PHPUnit's @group 6402
to the class docblock
|
||
return $address->id; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a line break here plz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Status: Needs work.
@@ -1327,7 +1327,7 @@ protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $ | |||
$resultColumnName = $this->getSQLColumnAlias($joinColumn['name']); | |||
$type = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); | |||
|
|||
$this->currentPersisterContext->rsm->addMetaResult($alias, $resultColumnName, $quotedColumn, $isIdentifier, $type); | |||
$this->currentPersisterContext->rsm->addMetaResult($alias, $resultColumnName, $joinColumn["name"], $isIdentifier, $type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use single quotes.
Thanks for the reviews, sorry for spamming Travis. |
@lemartin manually merged on 7c6c5d8 talking with @Ocramius we decided to keep in |
Handled in #6416 |
Apply quoting strategy to foreign key columns of one-to-one relation so
that correct select statements are generated. And use unquoted column
names in result mapping instead of quoted ones, as consumers (namely
IdentifierFlattener) expect unquoted column names.