DBAL-552: Colon (":") in field name treats like query parameter #1761

Closed
doctrinebot opened this Issue Jun 25, 2013 · 6 comments

2 participants

@doctrinebot

Jira issue originally created by user dbojdo:

The colon sign (":") is permitted for columns' name but Doctrine treats them like parameters placeholder:

SELECT `d.ns:col*name` FROM my*table d WHERE `d.date` >= :param1

causes DBALException:

An exception occurred while executing 'SELECT `d.ns:col*name` FROM my_table d WHERE `d.date` >= :param1' with params ["2013-06-24 14:22:18"]: Value for :col_name not found in params array. Params array key should be "col*name"
@doctrinebot

Comment created by @beberlei:

does this work with plain PDO?

@doctrinebot

Comment created by dbojdo:

Yes, it works perfectly fine with PDO. It also works properly with Doctrine\DBAL\Connection.
I suppose there's a bug somewhere in QueryBuilder.

@doctrinebot

Comment created by @deeky666:

Patch supplied in PR: #477

@doctrinebot

Comment created by @doctrinebot:

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

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label Dec 6, 2015
@deeky666 deeky666 was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.3.5 milestone 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