<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Tue May 21 11:56:08 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DC+AND+fixVersion+%3D+%221.2.4%22+AND+resolution+in+(Fixed%2C+%22Won't+Fix%22%2C+Duplicate%2C+Incomplete%2C+%22Cannot+Reproduce%22%2C+Invalid%2C+%22Can't+Fix%22)&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DC+AND+fixVersion+%3D+%221.2.4%22+AND+resolution+in+%28Fixed%2C+%22Won%27t+Fix%22%2C+Duplicate%2C+Incomplete%2C+%22Cannot+Reproduce%22%2C+Invalid%2C+%22Can%27t+Fix%22%29</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="6" total="6"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DC-848] Validator Timestamp does not validate &quot;YYYY-MM-DD hh:mm:ss&quot;-Timestamps</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-848</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description></description>
                <environment></environment>
            <key id="11856">DC-848</key>
            <summary>Validator Timestamp does not validate &quot;YYYY-MM-DD hh:mm:ss&quot;-Timestamps</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="sigma">Steffen Zeidler</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Aug 2010 15:05:36 +0000</created>
                <updated>Wed, 1 Sep 2010 14:38:37 +0000</updated>
                    <resolved>Wed, 1 Sep 2010 14:38:37 +0000</resolved>
                            <version>1.2.2</version>
                <version>1.2.3</version>
                                <fixVersion>1.2.4</fixVersion>
                                <component>Validators</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14200" author="sigma" created="Tue, 31 Aug 2010 15:32:53 +0000"  >&lt;p&gt;patch &amp;amp; test&lt;/p&gt;</comment>
                    <comment id="14202" author="sigma" created="Tue, 31 Aug 2010 15:39:20 +0000"  >&lt;p&gt;patch&lt;/p&gt;</comment>
                    <comment id="14222" author="jwage" created="Wed, 1 Sep 2010 14:38:37 +0000"  >&lt;p&gt;Thanks for the issue and patches!&lt;/p&gt;

&lt;p&gt;Fixed here &lt;a href=&quot;http://github.com/doctrine/doctrine1/commit/680b4ba489d15a4c7fba73ec6a832ca142877b7b&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/doctrine1/commit/680b4ba489d15a4c7fba73ec6a832ca142877b7b&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10759" name="DC848TestCase.php" size="1923" author="sigma" created="Tue, 31 Aug 2010 15:32:53 +0000" />
                    <attachment id="10762" name="Timestamp.patch" size="1078" author="sigma" created="Tue, 31 Aug 2010 15:39:20 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-754] When using a dot inside a string doctrine throws an exception because it believes what comes before the dot is a class name</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-754</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Hi Jon&lt;/p&gt;

&lt;p&gt;I ran into and patched another bug in Doctrine 1.2.2 (The menu in jija shows 1.2.3 as released but I am not seeing it in SVN or on the web site so I can&apos;t test the bug in that version).&lt;/p&gt;

&lt;p&gt;When you include a dot in a string in your select statement the function getExpressionOwner in Doctrine_Query fires and considers that the text appearing before the dot in the string is the name of a class. There for it attempts to extract a short alias out of it.&lt;/p&gt;

&lt;p&gt;I made a test case to illustrate this:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function testQuoteEncapedDots()
    {
        $q = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctrine_Query();
        $q-&amp;gt;select(&lt;span class=&quot;code-quote&quot;&gt;&quot;&apos;testing.dots.inquotes&apos; as string, u.name&quot;&lt;/span&gt;)-&amp;gt;from(&apos;User u&apos;);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEqual($q-&amp;gt;getSqlQuery(), &lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT e.id AS e__id, e.name AS e__name, &apos;testing.dots.inquotes&apos; AS e__0 FROM entity e WHERE (e.type = 0)&quot;&lt;/span&gt;);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;It throws the following exception.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Unexpected Doctrine_Query_Exception thrown in [Doctrine_Query_ShortAliases_TestC
ase] with message [Couldn&apos;t get &lt;span class=&quot;code-object&quot;&gt;short&lt;/span&gt; alias &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; testing] in C:\htdocs\php_librar
y\Doctrine_1.2_SVN\lib\Doctrine\Query\Abstract.php on line 679

Trace
-------------
#0 C:\htdocs\php_library\Doctrine_1.2_SVN\lib\Doctrine\Query.php(641): Doctrine_
Query_Abstract-&amp;gt;getSqlTableAlias(&apos;testing&apos;)
#1 C:\htdocs\php_library\Doctrine_1.2_SVN\lib\Doctrine\Query\Select.php(37): Doc
trine_Query-&amp;gt;parseSelect(&apos;&apos;testing.dots.i...&apos;)
#2 C:\htdocs\php_library\Doctrine_1.2_SVN\lib\Doctrine\Query\Abstract.php(2083):
 Doctrine_Query_Select-&amp;gt;parse(&apos;&apos;testing.dots.i...&apos;)
#3 C:\htdocs\php_library\Doctrine_1.2_SVN\lib\Doctrine\Query.php(1168): Doctrine
_Query_Abstract-&amp;gt;_processDqlQueryPart(&apos;select&apos;, Array)
#4 C:\htdocs\php_library\Doctrine_1.2_SVN\lib\Doctrine\Query.php(1134): Doctrine
_Query-&amp;gt;buildSqlQuery(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
#5 C:\htdocs\php_library\Doctrine_1.2_SVN\tests\Query\ShortAliasesTestCase.php(3
0): Doctrine_Query-&amp;gt;getSqlQuery()
#6 C:\htdocs\php_library\Doctrine_1.2_SVN\tests\DoctrineTest\UnitTestCase.php(15
8): Doctrine_Query_ShortAliases_TestCase-&amp;gt;testQuoteEncapedDots()
#7 C:\htdocs\php_library\Doctrine_1.2_SVN\tests\DoctrineTest\GroupTest.php(75):
UnitTestCase-&amp;gt;run()
#8 C:\htdocs\php_library\Doctrine_1.2_SVN\tests\DoctrineTest.php(183): GroupTest
-&amp;gt;run(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(DoctrineTest_Reporter_Cli), Array)
#9 C:\htdocs\php_library\Doctrine_1.2_SVN\tests\run.php(320): DoctrineTest-&amp;gt;run(
)
#10 {main}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I patched the bug by doing a preg_replace where all quote encaped strings are removed before looking for the short alias. The getExpressionOwner  function now reads as follows in my code:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getExpressionOwner($expr)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strtoupper(substr(trim($expr, &apos;( &apos;), 0, 6)) !== &apos;SELECT&apos;) {
			$expr = preg_replace(&apos;/([\\]*[\&apos;\&quot;])[^\1]*\1/&apos;, &apos;&apos;, $expr);
            preg_match_all(&lt;span class=&quot;code-quote&quot;&gt;&quot;/[a-z_][a-z0-9_]*\.[a-z_][a-z0-9_]*[\.[a-z0-9]+]*/i&quot;&lt;/span&gt;, $expr, $matches);

            $match = current($matches);

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($match[0])) {
                $terms = explode(&apos;.&apos;, $match[0]);

                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $terms[0];
            }
        }
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getRootAlias();

    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I am including the patch with this post but I think my version of the code base is starting diverge as I also have a few other things added to mine (as discussed in: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-701&quot; title=&quot;Aggregates functions do not return proper values when using many relationships and limits&quot;&gt;DC-701&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Hope you are well.&lt;/p&gt;

&lt;p&gt;Will Ferrer&lt;/p&gt;</description>
                <environment>XP Xamp</environment>
            <key id="11526">DC-754</key>
            <summary>When using a dot inside a string doctrine throws an exception because it believes what comes before the dot is a class name</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="willf1976">will ferrer</reporter>
                        <labels>
                    </labels>
                <created>Sun, 20 Jun 2010 04:01:09 +0000</created>
                <updated>Thu, 18 Nov 2010 18:26:32 +0000</updated>
                    <resolved>Wed, 1 Sep 2010 14:08:57 +0000</resolved>
                            <version>1.2.2</version>
                                <fixVersion>1.2.4</fixVersion>
                                <component>Query</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13397" author="willf1976" created="Mon, 21 Jun 2010 18:39:07 +0000"  >&lt;p&gt;Improved patch to have a more rigorous test case, refined the regex added, and put in a comment referencing this bug.&lt;/p&gt;</comment>
                    <comment id="13456" author="pgmateos" created="Tue, 29 Jun 2010 11:11:26 +0000"  >&lt;p&gt;Hi, we&apos;re having an issue which is related to this post and I&apos;d like to share it with you so maybe it&apos;s posible to solve both.&lt;/p&gt;

&lt;p&gt;The situation appears when you need to look for some data that includes a &quot;.&quot; inside a string SQL comparison with LIKE operator, here you have an example:&lt;/p&gt;

&lt;p&gt;$this-&amp;gt;pager = new sfDoctrinePager(&apos;Recurso&apos;, sfConfig::get(&apos;app_res_pag&apos;));&lt;br/&gt;
 $this-&amp;gt;pager-&amp;gt;getQuery()&lt;br/&gt;
            -&amp;gt;select(&apos;r.*,&lt;br/&gt;
                      c.alias as cliente_alias,&lt;br/&gt;
                      c.nombre as cliente_nombre,&lt;br/&gt;
                      o.alias as origen_alias,&lt;br/&gt;
                      o.nombre as origen_nombre,&lt;br/&gt;
                      GROUP_CONCAT(DISTINCT CONCAT_WS(&quot;,&quot;, cat.id, e.nombre) ORDER BY cat.id ASC) as elemento_nombre, &lt;br/&gt;
                      cv.hash as cv_hash&apos;)&lt;br/&gt;
            -&amp;gt;from(&apos;Recurso r&apos;)&lt;br/&gt;
            -&amp;gt;innerJoin(&apos;r.Cliente c&apos;)&lt;br/&gt;
            -&amp;gt;innerJoin(&apos;r.Origen o&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;r.RecursoCategoriaItem rci&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;rci.CategoriaItem ci&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;ci.Categoria cat&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;ci.Elemento e&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;ci.Nivel n&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;r.RecursoCv rcv&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;rcv.Cv cv&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;cv.Idioma i&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;r.RecursoComentario rc&apos;)&lt;br/&gt;
            -&amp;gt;leftJoin(&apos;rc.Comentario comm&apos;)&lt;br/&gt;
            -&amp;gt;where(&apos;r.apellido LIKE &quot;%.net%&quot; OR r.nombre LIKE &quot;%.net%&quot; OR r.numero_doc LIKE &quot;%.net%&quot; OR r.mail LIKE &quot;%.net%&quot; OR o.nombre LIKE &quot;%.net%&quot; OR cat.nombre LIKE &quot;%.net%&quot; OR e.nombre LIKE &quot;%.net%&quot; OR n.nombre LIKE &quot;%.net%&quot; OR c.nombre LIKE &quot;%.net%&quot; OR c.alias LIKE &quot;%.net%&quot; OR r.contenido LIKE &quot;%.net%&quot;&apos;)&lt;br/&gt;
            -&amp;gt;groupBy(&apos;r.id&apos;)&lt;br/&gt;
            &lt;del&gt;&amp;gt;orderBy(&apos;r.&apos; . $orderBy . &apos; &apos; . $this&lt;/del&gt;&amp;gt;order);&lt;br/&gt;
$this-&amp;gt;pager-&amp;gt;setPage($page);&lt;br/&gt;
$this-&amp;gt;pager-&amp;gt;init();&lt;/p&gt;


&lt;p&gt;Look at the &quot;WHERE&quot; line, there is a LIKE &quot;.net&quot;.&lt;/p&gt;

&lt;p&gt;So when we execute this code, Doctrine tries to parse the &quot;.&quot; in the &quot;.net&quot; like an SQL alias and of course it fails:&lt;/p&gt;

&lt;p&gt;ERROR:&lt;/p&gt;

&lt;p&gt;500 | Internal Server Error | Doctrine_Exception&lt;br/&gt;
Couldn&apos;t find class &quot;%&lt;/p&gt;

&lt;p&gt;Do you know some other why to solve this situation ?. In case you need further information about this, just ask me.&lt;/p&gt;

&lt;p&gt;Thank you in advance.&lt;/p&gt;

&lt;p&gt;Pablo Mateos.&lt;/p&gt;
</comment>
                    <comment id="13460" author="willf1976" created="Tue, 29 Jun 2010 19:28:17 +0000"  >&lt;p&gt;Hi Pablo&lt;/p&gt;

&lt;p&gt;I think I found a work around for you &amp;#8211; I tested this bug out to see if I could recreate and patch it and found that my own system didn&apos;t generate the bug. Turns out the difference is my code encapes the strings that go in the query with single quotes and this seems to solve the problem.&lt;/p&gt;

&lt;p&gt;Try the same query you posted above but replace the &quot;%.net%&quot; with &apos;%.net%&apos;.&lt;/p&gt;

&lt;p&gt;I think that should solve it.&lt;/p&gt;

&lt;p&gt;Hope that helps.&lt;/p&gt;

&lt;p&gt;Will&lt;/p&gt;</comment>
                    <comment id="13465" author="pgmateos" created="Wed, 30 Jun 2010 09:45:52 +0000"  >&lt;p&gt;Hi Will, I tried what you said and it worked !!!!!! &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;. It&apos;s great to have so easy solutions for debugging, isn&apos;t ?.&lt;/p&gt;

&lt;p&gt;So, anyway do you think this issue should be considered as a bug ?.&lt;/p&gt;

&lt;p&gt;I really appreciate  your help.&lt;/p&gt;

&lt;p&gt;Pablo.&lt;/p&gt;</comment>
                    <comment id="13475" author="willf1976" created="Wed, 30 Jun 2010 19:49:11 +0000"  >&lt;p&gt;Hi Pablo&lt;/p&gt;

&lt;p&gt;I am glad that worked &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.&lt;/p&gt;

&lt;p&gt;I do think this is still a bug &amp;#8211; I there are some problems with double quotes in dql in general I believe. Then again there may be something in the docs about this being a restriction that I overlooked (not sure).&lt;/p&gt;

&lt;p&gt;But since its solvable with using single quotes I would recommend putting it as a low priority bug &amp;#8211; which may mean it won&apos;t actually get fixed any time soon. Whether it gets fixed or not though its good to have these kinds of bugs in the system so that there is a record of everything that needs fixing and so other users can find work arounds to there problems by looking through the archive.&lt;/p&gt;

&lt;p&gt;Hope you are well.&lt;/p&gt;

&lt;p&gt;Will&lt;/p&gt;</comment>
                    <comment id="14220" author="jwage" created="Wed, 1 Sep 2010 14:08:57 +0000"  >&lt;p&gt;Thanks for the issue and patches!&lt;/p&gt;

&lt;p&gt;Fixed here &lt;a href=&quot;http://github.com/doctrine/doctrine1/commit/2ad78e62e360133efc04bf6897bf679c7f3d833b&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/doctrine1/commit/2ad78e62e360133efc04bf6897bf679c7f3d833b&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14227" author="willf1976" created="Wed, 1 Sep 2010 19:23:20 +0000"  >&lt;p&gt;individual patch for this issue with out other features included&lt;/p&gt;</comment>
                    <comment id="14782" author="smashcompany" created="Thu, 18 Nov 2010 15:38:55 +0000"  >&lt;p&gt;I&apos;m curious if this could be the same issue that causes doctrine:build-schema to give either the &apos;Missing class name&apos; or &apos;Couldn&apos;t find class Content &apos; error? I am going a little crazy trying to figure out why doctrine:build-schema doesn&apos;t work for me. Details here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.symfonyexperts.com/question/show/id/156&quot; class=&quot;external-link&quot;&gt;http://www.symfonyexperts.com/question/show/id/156&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14783" author="willf1976" created="Thu, 18 Nov 2010 18:26:32 +0000"  >&lt;p&gt;Hi Smash&lt;/p&gt;

&lt;p&gt;I did a quick glance at your issue. I have never encountered this error my self and I don&apos;t think it is related to my issue.&lt;/p&gt;

&lt;p&gt;When I have a bug like that the first place I start looking is where the exception is being thrown.&lt;/p&gt;

&lt;p&gt;For you its in the Doctrine_Import_Builder class on either line 949 or 995&lt;/p&gt;

&lt;p&gt;You could start by putting some debugging to see what the $definition var is. That may offer some insights. Then if that doesn&apos;t clarify whats wrong with your schema you could start back tracking out of the method to see where else things could be screwing up &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.&lt;/p&gt;

&lt;p&gt;Hope that helps at least alil bit.&lt;/p&gt;

&lt;p&gt;Will Ferrer&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10673" name="2010-06-21_Doctrine_1.2_SVN.patch" size="10740" author="willf1976" created="Mon, 21 Jun 2010 18:39:07 +0000" />
                    <attachment id="10765" name="DC_754_fix.patch" size="1474" author="willf1976" created="Wed, 1 Sep 2010 19:23:20 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-744] PHP Deprecated: Function spliti() is deprecated</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-744</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;spliti is deprecated with php 5.3.0+ and this function is used in Connection/Mssql.php lines 171 and 190&lt;br/&gt;
Original line:&lt;br/&gt;
$aux2 = spliti(&apos; as &apos;, $field_array);&lt;/p&gt;

&lt;p&gt;Probably replacing with:&lt;br/&gt;
preg_split(&apos;/ as /i&apos;, $field_array);&lt;/p&gt;

&lt;p&gt;Original PHP message :&lt;br/&gt;
PHP Deprecated: Function spliti() is deprecated in ....\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\vendor\doctrine\Doctrine\Connection\Mssql.php on line 190 &lt;/p&gt;</description>
                <environment>From Symfony 1.4 on Windows with PHP 5.3.2 using MSSQL (thru ODBC)</environment>
            <key id="11509">DC-744</key>
            <summary>PHP Deprecated: Function spliti() is deprecated</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="jphblais">Jean-Philippe Blais</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Jun 2010 14:51:16 +0000</created>
                <updated>Tue, 31 Aug 2010 13:11:48 +0000</updated>
                    <resolved>Tue, 31 Aug 2010 13:11:48 +0000</resolved>
                            <version>1.2.3</version>
                                <fixVersion>1.2.4</fixVersion>
                                <component>Connection</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13937" author="jh_nog" created="Thu, 12 Aug 2010 14:49:57 +0000"  >&lt;p&gt;This bug is also present in doctrine 1.2.2, the version used by the symfony framework 1.4.X&lt;/p&gt;

&lt;p&gt;Changing:&lt;br/&gt;
            $aux2 = spliti(&apos; as &apos;, $field_array); &lt;br/&gt;
By:&lt;br/&gt;
            $aux2 = preg_split(&apos;/ as /i&apos;, $field_array);&lt;/p&gt;

&lt;p&gt;As reported by Jean-Philippe Blais solves the deprecation message problems.&lt;/p&gt;</comment>
                    <comment id="14065" author="enrico" created="Wed, 25 Aug 2010 11:24:50 +0000"  >&lt;p&gt;Should be fixed with &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-828&quot; title=&quot;MSSQL - ORDER BY on text columns throws mssql error 306 [+patch]&quot;&gt;DC-828&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/estahn/doctrine1/compare/master...DC-828&quot; class=&quot;external-link&quot;&gt;http://github.com/estahn/doctrine1/compare/master...DC-828&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14195" author="doconnor" created="Tue, 31 Aug 2010 11:16:51 +0000"  >&lt;p&gt;Causing &lt;a href=&quot;http://pear.php.net/bugs/bug.php?id=17835&quot; class=&quot;external-link&quot;&gt;http://pear.php.net/bugs/bug.php?id=17835&lt;/a&gt; at the moment.&lt;/p&gt;

&lt;p&gt;Who can we bribe to get the preg_split() change in? We&apos;re stomping out all of these bugs in PEAR (&lt;a href=&quot;http://ollehost.dk/media/pear-bugs/&quot; class=&quot;external-link&quot;&gt;http://ollehost.dk/media/pear-bugs/&lt;/a&gt;) and this would just make life a little less painful&lt;/p&gt;</comment>
                    <comment id="14197" author="jwage" created="Tue, 31 Aug 2010 13:11:48 +0000"  >&lt;p&gt;Sorry for the delay, it is fixed here &lt;a href=&quot;http://trac.doctrine-project.org/changeset/7690&quot; class=&quot;external-link&quot;&gt;http://trac.doctrine-project.org/changeset/7690&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-713] [pgsql] importer does not fetch varchar max length</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-713</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;The importer doe not look for the max length of string columns.&lt;/p&gt;

&lt;p&gt;For example, the task generate-models-db is generating definitions like&lt;br/&gt;
   $this-&amp;gt;hasColumn(&apos;code&apos;, &apos;string&apos;, null, array(/**/));&lt;/p&gt;

&lt;p&gt;instead of&lt;br/&gt;
   $this-&amp;gt;hasColumn(&apos;code&apos;, &apos;string&apos;, 10, array(/**/));&lt;/p&gt;</description>
                <environment>PostgreSql</environment>
            <key id="11440">DC-713</key>
            <summary>[pgsql] importer does not fetch varchar max length</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="osvi">Francesco Montefoschi</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Jun 2010 17:54:44 +0000</created>
                <updated>Mon, 13 Sep 2010 12:49:48 +0000</updated>
                    <resolved>Wed, 25 Aug 2010 19:51:10 +0000</resolved>
                            <version>1.2.2</version>
                                <fixVersion>1.2.4</fixVersion>
                                <component>Import/Export</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="13093" author="osvi" created="Wed, 2 Jun 2010 18:02:39 +0000"  >&lt;p&gt;I created a patch on GitHub: &lt;a href=&quot;http://github.com/fmntf/doctrine1/tree/DC-713&quot; class=&quot;external-link&quot;&gt;http://github.com/fmntf/doctrine1/tree/DC-713&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Reading from `information_schema` we can also get the string length.&lt;br/&gt;
I tried to `generate-models-db` with original 1.2.2 code and patched code: it seems there are no regressions.&lt;/p&gt;</comment>
                    <comment id="13360" author="osvi" created="Thu, 17 Jun 2010 13:46:59 +0000"  >&lt;p&gt;I don&apos;t know what happened, but the `listTableColumns` query is&lt;/p&gt;

&lt;p&gt;   SELECT fields, t.typtype AS typtype FROM information_schema.columns WHERE ..&lt;/p&gt;

&lt;p&gt;and the t relation is not specified. By the way, commenting out the typtype, the string length is no more detected.&lt;br/&gt;
I think there is something wrong around line 170 - the &quot;type&quot; column should contain &quot;varchar&quot;, not &quot;character varying&quot;.&lt;/p&gt;</comment>
                    <comment id="13361" author="osvi" created="Thu, 17 Jun 2010 13:48:20 +0000"  >&lt;p&gt;I attached the query output, commenting the typtype column.&lt;/p&gt;</comment>
                    <comment id="13788" author="malechamawitz" created="Thu, 5 Aug 2010 13:09:59 +0000"  >&lt;p&gt;My workaround for `listTableColumns` query:&lt;br/&gt;
Doctrine/Import/Pgsql.php ln 101-102:&lt;/p&gt;

&lt;p&gt;                        &apos;listTableColumns&apos;     =&amp;gt; &quot;SELECT&lt;br/&gt;
                                                     ordinal_position as attnum,&lt;br/&gt;
                                                     column_name as field,&lt;br/&gt;
                                                     udt_name as type,&lt;br/&gt;
                                                     data_type as complete_type,&lt;br/&gt;
                                                     --t.typtype AS typtype,&lt;br/&gt;
						      (SELECT  t.typtype  FROM pg_type t WHERE t.typname = udt_name) AS typtype, &lt;br/&gt;
                                                     is_nullable as isnotnull,&lt;br/&gt;
                                                     column_default as default,&lt;br/&gt;
                                                     (&lt;br/&gt;
                                                       SELECT &apos;t&apos;&lt;br/&gt;
                                                         FROM pg_index, pg_attribute a, pg_class c, pg_type t&lt;br/&gt;
                                                         WHERE c.relname = table_name AND a.attname = column_name&lt;br/&gt;
                                                         AND a.attnum &amp;gt; 0 AND a.attrelid = c.oid AND a.atttypid = t.oid&lt;br/&gt;
                                                         AND c.oid = pg_index.indrelid AND a.attnum = ANY (pg_index.indkey)&lt;br/&gt;
                                                         AND pg_index.indisprimary = &apos;t&apos;&lt;br/&gt;
                                                         AND format_type(a.atttypid, a.atttypmod) NOT LIKE &apos;information_schema%%&apos;&lt;br/&gt;
                                                     ) as pri,&lt;br/&gt;
                                                     character_maximum_length as length&lt;br/&gt;
                                                   FROM information_schema.COLUMNS&lt;br/&gt;
                                                   WHERE table_name = %s&lt;br/&gt;
                                                   ORDER BY ordinal_position&quot;, FROM pg_type t WHERE t.typname = udt_name) AS typtype, &lt;/p&gt;</comment>
                    <comment id="14051" author="jwage" created="Tue, 24 Aug 2010 12:04:51 +0000"  >&lt;p&gt;Why was this re-opened? Your comment is not clear to me. Can you provide a test case or a proper patch so we can see the changes.&lt;/p&gt;</comment>
                    <comment id="14060" author="osvi" created="Tue, 24 Aug 2010 19:28:10 +0000"  >&lt;p&gt;Sorry if the comment was not clear.&lt;/p&gt;

&lt;p&gt;I proposed you a patch, I tested it before sending it back to you.&lt;br/&gt;
You applied something else to Doctrine source code that is not working. Try to copy and paste the query in &lt;a href=&quot;http://svn.doctrine-project.org/tags/1.2.3/lib/Doctrine/Import/Pgsql.php&quot; class=&quot;external-link&quot;&gt;http://svn.doctrine-project.org/tags/1.2.3/lib/Doctrine/Import/Pgsql.php&lt;/a&gt; (listTableColumns) to pgadmin and execute it. The postgres server will refuse to execute that query.&lt;br/&gt;
The error is due to a call to a &quot;t&quot; relation, which is not declared in the FROM (the query is something like: &quot;SELECT a.field, ..., t.field FROM a&quot;).&lt;/p&gt;

&lt;p&gt;The error is:&lt;br/&gt;
-----------------------------------------------------&lt;br/&gt;
ERROR:  missing FROM-clause entry for table &quot;t&quot;&lt;br/&gt;
LINE 6: ...                                                  t.typtype ...&lt;br/&gt;
                                                             ^&lt;br/&gt;
-----------------------------------------------------&lt;/p&gt;</comment>
                    <comment id="14061" author="jwage" created="Tue, 24 Aug 2010 19:56:13 +0000"  >&lt;p&gt;It had looked like this patch: &lt;a href=&quot;http://github.com/fmntf/doctrine1/commit/5a1123f78974fef7203500b082df754e1c69cbf6&quot; class=&quot;external-link&quot;&gt;http://github.com/fmntf/doctrine1/commit/5a1123f78974fef7203500b082df754e1c69cbf6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;was already applied. I did not apply any patch today. I am confused now, which patch is the right one?&lt;/p&gt;</comment>
                    <comment id="14070" author="osvi" created="Wed, 25 Aug 2010 17:28:32 +0000"  >&lt;p&gt;The patch was not applied correctly.&lt;/p&gt;

&lt;p&gt;In 1.2.3 importer the query has 8 direct fields in SELECT + 1 field as subquery&lt;br/&gt;
My patch has 7 direct fields + 1 as subquery.&lt;/p&gt;

&lt;p&gt;Compare also the subquery. Mine is one line shorter.&lt;/p&gt;

&lt;p&gt;Read the two queries line by line. They are different, and the one in 1.2.3 cannot be executed &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="14071" author="jwage" created="Wed, 25 Aug 2010 17:35:51 +0000"  >&lt;p&gt;Can you generate a patch and paste it in a code block?&lt;/p&gt;</comment>
                    <comment id="14073" author="jwage" created="Wed, 25 Aug 2010 19:51:10 +0000"  >&lt;p&gt;Hopefully this fixes it for good.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://trac.doctrine-project.org/changeset/7689&quot; class=&quot;external-link&quot;&gt;http://trac.doctrine-project.org/changeset/7689&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14118" author="osvi" created="Fri, 27 Aug 2010 14:21:33 +0000"  >&lt;p&gt;It seems to be fine!&lt;/p&gt;</comment>
                    <comment id="14357" author="mvrhov" created="Mon, 13 Sep 2010 07:37:11 +0000"  >&lt;p&gt;Ok.. this is complete mess, somebody with permissions should reopen it.&lt;br/&gt;
This one works for Francesco as he is running with notices disabled.&lt;br/&gt;
if ttype is removed or commented out , then you get a notices that ttype key doesn&apos;t exist.&lt;br/&gt;
and it seems that ttype is required for enums to work.&lt;/p&gt;

&lt;p&gt;in one of the comments Ricardo suggested replacing ...&lt;br/&gt;
t.typtype AS typtype with&lt;br/&gt;
(SELECT t.typtype FROM pg_type t WHERE t.typname = udt_name) AS typtype,&lt;/p&gt;

&lt;p&gt;adding this get&apos;s rid of notices, but i don&apos;t know what happens for other things mentioned within comments of if this is a correct fix... The one who provided support for enums should take a look&lt;/p&gt;

&lt;p&gt;I think Francesco should run import with notices enabled and then add the upper sub-query to get rid f them.. then it should also test if the rest of the import still works correctly.  &lt;/p&gt;</comment>
                    <comment id="14361" author="osvi" created="Mon, 13 Sep 2010 12:49:48 +0000"  >&lt;p&gt;My apologies, I developed the patch on a non development machine, so I used the default PHP configuration.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10668" name="pgsql.png" size="18820" author="osvi" created="Thu, 17 Jun 2010 13:48:20 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-645] Query with a leftJoin() + where(NOT IN) + limit() generate wrong SQL alias in the NOT IN part</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-645</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I have a simple case with 3 Classes. Contact, Phone and Email. A Contact can many many phones, but only one email.&lt;/p&gt;

&lt;p&gt;When doing this simple query:&lt;br/&gt;
$query = Doctrine_Query::create()-&amp;gt;from(&apos;Contact c&apos;);&lt;br/&gt;
$query-&amp;gt;leftJoin(&apos;c.Phones p ON c.id = p.contact_id&apos;);&lt;br/&gt;
$query-&amp;gt;where(&apos;c.id NOT IN (SELECT Email.contact_id FROM Email)&apos;);&lt;br/&gt;
$query-&amp;gt;execute();&lt;br/&gt;
Every thing went fine.&lt;/p&gt;

&lt;p&gt;But when adding a limit() condition like: &lt;br/&gt;
$query-&amp;gt;limit(20);&lt;br/&gt;
$query-&amp;gt;execute();&lt;/p&gt;

&lt;p&gt;The SQL generated query is not valid. There is a problem with the alias used in the NOT IN subquery. This query is generated like this:&lt;br/&gt;
WHERE c2.id NOT IN (SELECT e2.contact_id AS e2__contact_id FROM email e)&lt;br/&gt;
There is a mix between alias e2 and e&lt;/p&gt;

&lt;p&gt;I have been trying to debug, but I didn&apos;t understand what was going wrong. The problem seems to happend in the class Doctrine_Query between line 1486 and 1554, but this part is obscur to me.&lt;/p&gt;

&lt;p&gt;I attach to this ticket a valid TestCase &lt;/p&gt;

&lt;p&gt;Thanks for support&lt;/p&gt;</description>
                <environment>&lt;br/&gt;
PHP 5.3.1 (cli) (built: Feb 11 2010 02:32:22) &lt;br/&gt;
mysql  Ver 14.14 Distrib 5.1.41, for apple-darwin9.5.0 (i386) using readline 5.1&lt;br/&gt;
Doctrine version 1.2.2 from SVN: &lt;a href=&quot;http://doctrine.mirror.svn.symfony-project.com/tags/1.2.2/lib/Doctrine.php&quot;&gt;http://doctrine.mirror.svn.symfony-project.com/tags/1.2.2/lib/Doctrine.php&lt;/a&gt;</environment>
            <key id="11259">DC-645</key>
            <summary>Query with a leftJoin() + where(NOT IN) + limit() generate wrong SQL alias in the NOT IN part</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="jeanmonod">David Jeanmonod</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Apr 2010 03:09:06 +0000</created>
                <updated>Thu, 2 Sep 2010 15:48:49 +0000</updated>
                    <resolved>Thu, 2 Sep 2010 15:48:49 +0000</resolved>
                            <version>1.2.2</version>
                                <fixVersion>1.2.4</fixVersion>
                                <component>Query</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="12737" author="jeanmonod" created="Fri, 23 Apr 2010 03:18:09 +0000"  >&lt;p&gt;TEXT VERSION OF THE TEST CASE&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;/p&gt;

&lt;p&gt;require_once(&apos;doctrine/lib/Doctrine.php&apos;);&lt;br/&gt;
spl_autoload_register(array(&apos;Doctrine&apos;, &apos;autoload&apos;));&lt;br/&gt;
$manager = Doctrine_Manager::getInstance();&lt;br/&gt;
$manager-&amp;gt;setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL);&lt;br/&gt;
$conn = Doctrine_Manager::connection(&apos;mysql://root:@localhost/test_doctrine&apos;);&lt;br/&gt;
echo &quot;Connection is set up\n&quot;;&lt;/p&gt;

&lt;p&gt;class Contact extends Doctrine_Record {&lt;br/&gt;
    public function setTableDefinition()&lt;/p&gt;
{
        $this-&amp;gt;setTableName(&apos;contact&apos;);
        $this-&amp;gt;hasColumn(&apos;name&apos;, &apos;string&apos;, 300, array(&apos;type&apos; =&amp;gt; &apos;string&apos;, &apos;length&apos; =&amp;gt; 300));
    }
&lt;p&gt;    public function setUp()&lt;/p&gt;
{
        $this-&amp;gt;hasMany(&apos;Phone as Phones&apos;, array(&apos;local&apos; =&amp;gt; &apos;id&apos;, &apos;foreign&apos; =&amp;gt; &apos;contact_id&apos;));
        $this-&amp;gt;hasOne(&apos;Email as Email&apos;, array(&apos;local&apos; =&amp;gt; &apos;id&apos;, &apos;foreign&apos; =&amp;gt; &apos;contact_id&apos;));
    }
&lt;p&gt;}&lt;br/&gt;
class Phone extends Doctrine_Record {&lt;br/&gt;
    public function setTableDefinition()&lt;/p&gt;
{
        $this-&amp;gt;setTableName(&apos;phone&apos;);
        $this-&amp;gt;hasColumn(&apos;contact_id&apos;, &apos;integer&apos;, null, array(&apos;type&apos; =&amp;gt; &apos;integer&apos;));
    }
&lt;p&gt;    public function setUp() &lt;/p&gt;
{
        $this-&amp;gt;hasOne(&apos;Contact&apos;, array(&apos;local&apos; =&amp;gt; &apos;contact_id&apos;, &apos;foreign&apos; =&amp;gt; &apos;id&apos;, &apos;onDelete&apos; =&amp;gt; &apos;CASCADE&apos;));
    }
&lt;p&gt;}&lt;br/&gt;
class Email extends Doctrine_Record {&lt;br/&gt;
    public function setTableDefinition()&lt;/p&gt;
{
        $this-&amp;gt;setTableName(&apos;email&apos;);
        $this-&amp;gt;hasColumn(&apos;contact_id&apos;, &apos;integer&apos;, null, array(&apos;type&apos; =&amp;gt; &apos;integer&apos;));
    }
&lt;p&gt;    public function setUp()&lt;/p&gt;
{
        $this-&amp;gt;hasOne(&apos;Contact&apos;, array(&apos;local&apos; =&amp;gt; &apos;contact_id&apos;, &apos;foreign&apos; =&amp;gt; &apos;id&apos;));
    }
&lt;p&gt;}&lt;br/&gt;
echo &quot;Classes Contact, Phone and Email are defines\n&quot;;&lt;/p&gt;


&lt;p&gt;try &lt;/p&gt;
{Doctrine::dropDatabases();}
&lt;p&gt;catch(Exception $e){} // Drop if exist &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
Doctrine::createDatabases();&lt;br/&gt;
Doctrine::createTablesFromArray(array(&apos;Contact&apos;, &apos;Phone&apos;, &apos;Email&apos;));&lt;br/&gt;
echo &quot;Databases tables are create\n&quot;;&lt;/p&gt;


&lt;p&gt;$query = Doctrine_Query::create()-&amp;gt;from(&apos;Contact c&apos;);&lt;br/&gt;
$query-&amp;gt;leftJoin(&apos;c.Phones p ON c.id = p.contact_id&apos;);&lt;br/&gt;
$query-&amp;gt;where(&apos;c.id NOT IN (SELECT Email.contact_id FROM Email)&apos;);&lt;br/&gt;
$query-&amp;gt;limit(20);&lt;br/&gt;
try {&lt;br/&gt;
  $query-&amp;gt;execute();&lt;br/&gt;
  echo &quot;TEST: Doctrine LEFTJOIN + NOT IN + LIMIT is OK\n&quot;;&lt;br/&gt;
}&lt;br/&gt;
catch (Exception $e){&lt;br/&gt;
  echo &quot;TEST: Doctrine LEFTJOIN + NOTIN + LIMIT is NOT working\n Alias in the NOT IN part are wrong, we get e2 and e\n\nDetail of the error:\n &quot;, $e-&amp;gt;getMessage(), &quot;\n&quot;;&lt;br/&gt;
}&lt;/p&gt;</comment>
                    <comment id="13461" author="willf1976" created="Wed, 30 Jun 2010 02:16:46 +0000"  >&lt;p&gt;Hi David&lt;/p&gt;

&lt;p&gt;I had a problem with subqueries in the which I worked around by including real sql in the subquery with a prefix of SQL:.&lt;/p&gt;

&lt;p&gt;My bug occurred trying to run this code:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$q = Doctrine_Query::create(); 
$q-&amp;gt;from(&apos;Customer Customer&apos;); 
$q-&amp;gt;addWhere(&apos; Customer.id in (SELECT Customer.id as customer_id FROM Customer Customer)&apos;); 
$q-&amp;gt;addSelect(&apos;Customer.id&apos;); 
$q-&amp;gt;addSelect(&apos;Customer.id as customer_id&apos;);
$q-&amp;gt;limit(20);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However this code works fine for me now (though make sure you have the latest svn build of doctrine because there were some patches that helped this work):&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$q = Doctrine_Query::create(); 
$q-&amp;gt;from(&apos;Customer Customer&apos;); 
$q-&amp;gt;addWhere(&apos; Customer.id in (SQL:SELECT p.id AS p__0 FROM product_customers p)&apos;); 
$q-&amp;gt;addSelect(&apos;Customer.id&apos;); 
$q-&amp;gt;addSelect(&apos;Customer.id as customer_id&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Notice the use of SQL: in the subquery.&lt;/p&gt;

&lt;p&gt;Here is the bug:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-692&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DC-692&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also worth noting that I am getting that sql by building another query and then running the getSqlQuery method to return the sql I am then using in the other query.&lt;/p&gt;

&lt;p&gt;Hope that helps.&lt;/p&gt;

&lt;p&gt;Will Ferrer&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10582" name="NotIn_LeftJoin_Limit_TestCase.php" size="2205" author="jeanmonod" created="Fri, 23 Apr 2010 03:09:06 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-421] Doctrine_Table::createQuery() can use wrong connection</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-421</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;&lt;tt&gt;r6799&lt;/tt&gt; introduced 3 changes to the &lt;tt&gt;Doctrine_Table&lt;/tt&gt;: in &lt;tt&gt;findByDql()&lt;/tt&gt;, &lt;tt&gt;getQueryObject()&lt;/tt&gt;, and &lt;tt&gt;createQuery()&lt;/tt&gt; methods.&lt;br/&gt;
The first two are pretty obvious, but the last one is a mistake in my opinion:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;--- lib/Doctrine/Table.php	(revision 6798)
+++ lib/Doctrine/Table.php	(revision 6799)
@@ -1033,7 +1033,7 @@
 
         $class = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getAttribute(Doctrine_Core::ATTR_QUERY_CLASS);
 
-        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Doctrine_Query::create($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_conn, $class)
+        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Doctrine_Query::create(&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, $class)
             -&amp;gt;from($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getComponentName() . $alias);
     }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;An instance of &lt;tt&gt;Doctrine_Table&lt;/tt&gt; always has a reference to a particular &lt;tt&gt;Doctrine_Connection&lt;/tt&gt;, so why &lt;tt&gt;createQuery()&lt;/tt&gt; method, intended to &quot;create a query on this table&quot; should use different (i.e. default one) connection instead of already specified one?&lt;/p&gt;</description>
                <environment></environment>
            <key id="10716">DC-421</key>
            <summary>Doctrine_Table::createQuery() can use wrong connection</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="esycat">Eugene Janusov</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Jan 2010 04:50:27 +0000</created>
                <updated>Tue, 7 Dec 2010 22:34:44 +0000</updated>
                    <resolved>Tue, 7 Dec 2010 22:34:44 +0000</resolved>
                            <version>1.2.0</version>
                <version>1.2.1</version>
                                <fixVersion>1.2.4</fixVersion>
                                <component>Connection</component>
                <component>Query</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="11430" author="esycat" created="Wed, 20 Jan 2010 00:26:20 +0000"  >&lt;p&gt;Attached test case.&lt;/p&gt;</comment>
                    <comment id="11431" author="esycat" created="Wed, 20 Jan 2010 00:38:59 +0000"  >&lt;p&gt;While preparing the test case, I looked more closely to the sources. It turns out that if you do something like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Doctrine::getTable(&apos;ComponentName&apos;)-&amp;gt;createQuery()-&amp;gt;execute()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;then eventually the preferred connection will be used.&lt;/p&gt;

&lt;p&gt;But &lt;tt&gt;createQuery()&lt;/tt&gt; method creates a new &lt;tt&gt;Doctrine_Query&lt;/tt&gt; and doesn&apos;t pass a connection, thus &lt;tt&gt;Doctrine_Query_Abstract&lt;/tt&gt;&apos;s constructor tries to get a default connection, which is unacceptable if you&apos;d like to work without a default connection.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;A possible solution that I see is to not set &lt;tt&gt;$this&lt;/del&gt;&amp;gt;_conn&lt;/tt&gt; inside &lt;tt&gt;Doctrine_Query&lt;/tt&gt; as long as it will not be really required.-&lt;/p&gt;</comment>
                    <comment id="11432" author="esycat" created="Wed, 20 Jan 2010 01:03:48 +0000"  >&lt;p&gt;I found another solution. As I said above, the problem is really relevant only if you don&apos;t use a default connection. But in this case you must bind all your components to a particular connection(s). So, we can just check for &lt;tt&gt;hasConnectionForComponent()&lt;/tt&gt; inside &lt;tt&gt;Doctrine_Table::createQuery()&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="13199" author="jwage" created="Tue, 8 Jun 2010 15:17:12 +0000"  >&lt;p&gt;Can you provide the fix you found as a patch so I can clearly see it and test it? Thanks, Jon&lt;/p&gt;</comment>
                    <comment id="13594" author="paulkamer" created="Sat, 17 Jul 2010 08:27:23 +0000"  >&lt;p&gt;Jonathan, I can confirm that this patch solves this issue. &lt;br/&gt;
It also fixes this ticked in Symfony 1.X: &lt;a href=&quot;http://trac.symfony-project.org/ticket/7689&quot; class=&quot;external-link&quot;&gt;http://trac.symfony-project.org/ticket/7689&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="13825" author="jocl" created="Sat, 7 Aug 2010 07:57:45 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-421&quot; title=&quot;Doctrine_Table::createQuery() can use wrong connection&quot;&gt;&lt;del&gt;DC-421&lt;/del&gt;&lt;/a&gt;.patch works for me too.&lt;/p&gt;</comment>
                    <comment id="14930" author="jwage" created="Tue, 7 Dec 2010 22:33:36 +0000"  >&lt;p&gt;I&apos;ve reverted that one change and everything seems better now: &lt;a href=&quot;https://github.com/doctrine/doctrine1/commit/b4dc8e66a89a7e17cd195c489b18005e19ca9ea5&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine1/commit/b4dc8e66a89a7e17cd195c489b18005e19ca9ea5&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10303" name="DC-421.patch" size="779" author="esycat" created="Wed, 20 Jan 2010 01:04:06 +0000" />
                    <attachment id="10305" name="DC421TestCase.php" size="3116" author="esycat" created="Wed, 20 Jan 2010 01:22:24 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>