DBAL-103: Quoting is not supported in pdo_odbc driver #960

Closed
doctrinebot opened this Issue Mar 22, 2011 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user johnarevalo:

trying to execute this dql:

SELECT p FROM my\namespace\entities\PQR p WHERE p.razon = 'TEL'

it built this native sql (iseries)

SELECT t0.SGNUMÑ AS SGNUMÑ0, t0_.SGCAUS AS SGCAUS1, t0_.SGREAS AS SGREAS2 FROM SGMASTL7 t0_ WHERE t0.SGCAUS =

because pdo is created with odbc[1], quote method[2] is not supported, and Doctrine/DBAL/Connection.php#quote()[3] method returns an empty value for <'TEL'> expression, so Database throws a Syntax error. It should be support for drivers which doesn't have implemented quote() method.

[1] with odbc: $pdo = new PDO("odbc:MYODBCNAME", "USER", "PASSWORD");
[2] http://php.net/manual/en/pdo.quote.php
[3] https://github.com/doctrine/dbal/blob/2.0.3/lib/Doctrine/DBAL/Connection.php#L520

@doctrinebot

Comment created by @beberlei:

As a first trick you can use the wrapperClass parameter to the DriverManager factory and create your "MyConnection extends \Doctrine\DBAL\Connection" to solve this issue.

@doctrinebot

Comment created by @beberlei:

Closed, odbc is not a supported driver.

@doctrinebot

Issue was closed with resolution "Can't Fix"

@doctrinebot doctrinebot added the Bug label Dec 6, 2015
@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment