Doctrine Projecthttp://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&jqlQuery=fixVersion+%3D+%222.3.3%22+AND+project+%3D+DBAL
An XML representation of a search requesten-us6.2.3626015-04-2014[DBAL-461] Numeric() syntax in columns fails on SQL Serverhttp://www.doctrine-project.org/jira/browse/DBAL-461
Doctrine DBAL<p>This issue occurred when I tried to create entities from existing MSSQL Database. My database have several fields that are defined as "numeric" data types. When I tried to reverse engineer this data base, doctrine threw an error mentioning that doctrine numeric data types are not supported. I have attached code that I used to create entities. And error that was generated. Hope this Helps narrow down the process. One thing that ca in to notice was that the "SQLServerSchemaManager" class does not have any specific mechanism to handle "numeric" as compared to "MySqlSchemaManager".</p>DBAL-461Numeric() syntax in columns fails on SQL ServerBugMajorResolvedFixedAllBenjamin EberleiBenjamin EberleiThu, 7 Mar 2013 06:59:15 +0000Thu, 14 Mar 2013 21:30:44 +0000Thu, 14 Mar 2013 21:30:44 +00002.2.22.3.22.3.302<p>Fixed</p>[DBAL-458] [GH-281] Upgrading doctrine/common 2.4 (via composer)http://www.doctrine-project.org/jira/browse/DBAL-458
Doctrine DBAL<p>This issue is created automatically through a Github pull request on behalf of Ocramius:</p>
<p> Url: <a href="https://github.com/doctrine/dbal/pull/281" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/281</a></p>
<p>Message:</p>
<p>This PR introduces changes necessary to make the DBAL recognize `"doctrine/common": "2.4"` as compatible as discussed in <a href="https://groups.google.com/d/topic/doctrine-dev/8WjzboENQgg/discussion" class="external-link" rel="nofollow">https://groups.google.com/d/topic/doctrine-dev/8WjzboENQgg/discussion</a></p>
<p>Ping @dbu</p>DBAL-458[GH-281] Upgrading doctrine/common 2.4 (via composer)BugMajorResolvedFixedAllBenjamin EberleiBenjamin EberleiMon, 4 Mar 2013 22:01:47 +0000Mon, 4 Mar 2013 22:38:23 +0000Mon, 4 Mar 2013 22:38:23 +00002.3.301<p>A related Github Pull-Request <span class="error">&#91;GH-281&#93;</span> was closed<br/>
<a href="https://github.com/doctrine/dbal/pull/281" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/281</a></p>[DBAL-452] range is a reserved word in several platformshttp://www.doctrine-project.org/jira/browse/DBAL-452
Doctrine DBAL<p>'range' is a reserved word for MySQL, Oracle, and on future reserved list for SQL Server as well so should really be added for escaping. Working on a new project using Doctrine accessing an external API which used it as a field and got an error when running orm:schema-tool:create on my entity with MySQL.</p>Linux 64bitDBAL-452range is a reserved word in several platformsBugMajorResolvedFixedBenjamin EberleiMichael CummingsThu, 21 Feb 2013 07:49:49 +0000Fri, 15 Mar 2013 03:02:01 +0000Thu, 14 Mar 2013 21:55:32 +00002.3.32.3.3Platforms02<p>Added for MySQL and Oracle. Didn't find data on when its added to SQL Server.</p><p><a href="http://msdn.microsoft.com/en-us/library/ms189822.aspx" class="external-link" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms189822.aspx</a> under Future Keywords</p>[DBAL-446] Type json_array can't be nullhttp://www.doctrine-project.org/jira/browse/DBAL-446
Doctrine DBAL<p>Column type json_array can be set to nullable, but if there's null in the database, it is returned as an empty array to PHP.</p>
<p>Null should be returned instead, as that's how the other types behave too.</p>DBAL-446Type json_array can't be nullBugMajorReopenedUnresolvedAllMarco PivettaJan HrubanWed, 13 Feb 2013 16:58:40 +0000Sun, 4 Jan 2015 06:45:15 +00002.32.4.22.3.317<p>This was fixed in 2.3.3</p><p>I'm seeing this behaviour again in v2.5.0-BETA3 (6d0b048). If I get time this week I can perform a bisect to figure out when it regressed.</p><p>Actually I don't think this was a regression; it looks like a fix was never made. I've opened a PR: <a href="https://github.com/doctrine/dbal/pull/655" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/655</a></p><p>A related Github Pull-Request <span class="error">&#91;GH-655&#93;</span> was closed:<br/>
<a href="https://github.com/doctrine/dbal/pull/655" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/655</a></p><p>A related Github Pull-Request <span class="error">&#91;GH-655&#93;</span> was assigned:<br/>
<a href="https://github.com/doctrine/dbal/pull/655" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/655</a></p><p>Re-opened, as this behavior seems reproducible also in 2.4.x</p><p>It was never fixed. That seems to have been a misunderstanding here. As pointed out by <a href="http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=ocramius" class="user-hover" rel="ocramius">Marco Pivetta</a> changing this behaviour is a BC break and can't be fixed before 3.0.</p><p>I spent the time to develop a custom data type to workaround this bug: <a href="https://frickenate.com/2014/10/json-data-type-doctrine/" class="external-link" rel="nofollow">https://frickenate.com/2014/10/json-data-type-doctrine/</a> . I can't imagine anybody storing null expecting to receive back an empty array. That would be a fundamental break from the very purpose of the SQL NULL value.</p>ReferenceDBAL-966[DBAL-436] Logger should specify connection used in a master/slave situationhttp://www.doctrine-project.org/jira/browse/DBAL-436
Doctrine DBAL<p>Suppose there is a master connection with four slaves specified. Connections are being handled by the Doctrine\DBAL\Connections\MasterSlaveConnection class. Under the current implementation, all queries are logged under the "master" connection, even queries that are routed to the slaves by the Doctrine\DBAL\Connections\MasterSlaveConnection class.</p>
<p>Since slave connections are separate, distinct connections, queries should be logged appropriately under their respective connections.</p>DBAL-436Logger should specify connection used in a master/slave situationBugMajorResolvedInvalidAllBenjamin EberleiJarrod NettlesThu, 31 Jan 2013 22:47:28 +0000Mon, 1 Apr 2013 16:34:12 +0000Mon, 1 Apr 2013 16:34:12 +00002.3.22.3.302<p>Two reasons why this is not feasible:</p>
<p>1. We actually don't ship loggers on our own, so if you want you can implement this yourself. We wouldn't have a way to "add" this, we only provide the interface.</p>
<p>2. However the logger does not have access to the connection to find out which slave or master its currently using, you can create a logger that has a "setConnection($conn)" method and call this during bootstrapping the logger+connection.</p>[DBAL-416] [GH-249] Fixed doModifyLimitQuery for SQLServerPlatformhttp://www.doctrine-project.org/jira/browse/DBAL-416
Doctrine DBAL<p>This issue is created automatically through a Github pull request on behalf of norzechowicz:</p>
<p> Url: <a href="https://github.com/doctrine/dbal/pull/249" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/249</a></p>
<p>Message:</p>
<p>It seems that there is a problem in SQLServerPlatform ``doModifyLimitQuery`` method. <br/>
I can't use Doctrine ORM Paginator because of wrong position of ``DISTINCT`` statement in final limit subquery, here is the exception message I'm getting.<br/>
``SQLSTATE<span class="error">&#91;42000&#93;</span>: <span class="error">&#91;Microsoft&#93;</span><span class="error">&#91;SQL Server Native Client 10.0&#93;</span><span class="error">&#91;SQL Server&#93;</span>Incorrect syntax near the keyword 'DISTINCT'.``</p>
<p>My proposition is to change ``doModifyLimitQuery`` result from:</p>
<p>``SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY username DESC) AS doctrine_rownum, * FROM user) ...``</p>
<p>into:</p>
<p>``SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY username DESC) AS doctrine_rownum FROM user) ...``</p>
DBAL-416[GH-249] Fixed doModifyLimitQuery for SQLServerPlatformBugMajorResolvedFixedAllBenjamin EberleiBenjamin EberleiFri, 18 Jan 2013 12:28:05 +0000Sun, 20 Jan 2013 11:50:54 +0000Sun, 20 Jan 2013 11:50:54 +00002.3.301<p>A related Github Pull-Request <span class="error">&#91;GH-249&#93;</span> was closed<br/>
<a href="https://github.com/doctrine/dbal/pull/249" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/249</a></p>[DBAL-364] [GH-216] Fixed SQL placeholder parsinghttp://www.doctrine-project.org/jira/browse/DBAL-364
Doctrine DBAL<p>This issue is created automatically through a Github pull request on behalf of a-nik:</p>
<p> Url: <a href="https://github.com/doctrine/dbal/pull/216" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/216</a></p>
<p>Message:</p>
<p>Fixed comment on 'getPlaceholderPositions' method<br/>
Fixed error on escaped quote mark inside an SQL expression</p>DBAL-364[GH-216] Fixed SQL placeholder parsingBugMajorResolvedFixedAllBenjamin EberleiBenjamin EberleiThu, 11 Oct 2012 11:43:18 +0000Sat, 19 Jan 2013 18:26:56 +0000Sat, 19 Jan 2013 16:09:23 +00002.3.302<p>Closed in favor of GH-113</p><p>Fixed in 2.3.3</p>[DBAL-231] Doctrine\DBAL\SQLParserUtils::getPlaceholderPositions() - regexhttp://www.doctrine-project.org/jira/browse/DBAL-231
Doctrine DBAL<p>Running the following SQL (note the named parameter ":account_id"):<br/>
===================<br/>
SELECT count('*') as cnt FROM feed f INNER JOIN orders_accounts oa ON oa.order_id = f.feed_id INNER JOIN users u ON u.id = f.user_id WHERE oa.account_id = :account_id AND f.feed_type='order' ORDER BY f.create_date DESC <br/>
===================</p>
<p>ends up in a thrown exception.<br/>
This SQL was generated by using the Query Builder</p>
<p> $qb = $this-&gt;_em-&gt;getConnection()-&gt;createQueryBuilder();<br/>
$qb-&gt;select('count(\'*\') as cnt');//I know this is bad<br/>
$qb-&gt;from('feed', 'f');<br/>
$qb-&gt;innerJoin('f', 'orders_accounts', 'oa', 'oa.order_id = f.feed_id');<br/>
$qb-&gt;innerJoin('f', 'users', 'u', 'u.id = f.user_id');<br/>
$qb-&gt;where('oa.account_id = :account_id AND f.feed_type=\'order\'');<br/>
$qb-&gt;setParameter('account_id', $accountId, \PDO::PARAM_INT);</p>
<p> $stmt = $qb-&gt;execute();<br/>
$res = $stmt-&gt;fetchAll(\PDO::FETCH_COLUMN);</p>
<p>===================<br/>
string(82) "SQLSTATE<span class="error">&#91;42S22&#93;</span>: Column not found: 1054 Unknown column 'NULL_id' in 'where clause'"<br/>
string(3168) "#0 /var/www/cake_to_zf/library/Doctrine/DBAL/Connection.php(628): PDOStatement-&gt;execute()<br/>
#1 /var/www/cake_to_zf/library/Doctrine/DBAL/Query/QueryBuilder.php(185): Doctrine\DBAL\Connection-&gt;executeQuery('SELECT count('*...', Array, Array)<br/>
#2 /var/www/cake_to_zf/library/of/doctrine/SqlQueryBuilderPaginatorAdapter.php(69): Doctrine\DBAL\Query\QueryBuilder-&gt;execute()<br/>
#3 /var/www/cake_to_zf/library/Zend/Paginator.php(1060): of\doctrine\SqlQueryBuilderPaginatorAdapter-&gt;count()<br/>
.......</p>
<p>Suggested Fix:</p>
<p>Regex on line 64 in preg_match becomes '#(<span class="error">&#91;:a-zA-Z0-9_&#93;</span></p>
{1}
<p>)#' <br/>
Added was an "_" ...</p>
<p>===================</p>Fedora-16, Zend Serve CE, PHP 5.3.5DBAL-231Doctrine\DBAL\SQLParserUtils::getPlaceholderPositions() - regexBugMajorResolvedFixedAllBenjamin EberleiIvo MandalskiMon, 5 Mar 2012 16:31:56 +0000Sat, 19 Jan 2013 18:27:29 +0000Wed, 14 Mar 2012 19:38:48 +00002.22.3.301<p>Fixed</p><p>Merged in 2.1.x and 2.2 branches.</p><p>I already fixed this in my reworking of the SqlParserUtils last month. See pull request and confirm that this issue was fixed there, together with other parsing problems:</p>
<p><a href="https://github.com/doctrine/dbal/pull/113" class="external-link" rel="nofollow">https://github.com/doctrine/dbal/pull/113</a></p><p>Fixed in 2.3.3</p>