<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 23:54:27 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/si/jira.issueviews:issue-xml/DC-312/DC-312.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DC-312] Doctrine_Pager query &quot;influences&quot; Doctrine::getTable() query</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-312</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When I use the same procedure without Doctrine_Pager everything works fine, with Doctrine_Pager the behavior of later queries is strange. Example:&lt;br/&gt;
----------------WORKING:&lt;br/&gt;
1. I fetch list &lt;br/&gt;
Doctrine_Query::create()&lt;del&gt;&amp;gt;select(&apos;z.&lt;b&gt;,s.&lt;/b&gt;,o.*,u.jmeno as Vlo&#382;il,k.nazev_cs as Kategorie&apos;)&lt;/del&gt;&amp;gt;from(&apos;ShopZbozi z,z.Obrazek o,z.Soubor s,z.Uzivatel u,z.ShopKategorie k&apos;)&lt;del&gt;&amp;gt;orderby(&apos;z.nazev_cs ASC&apos;)&lt;/del&gt;&amp;gt;fetchArray(); &lt;/p&gt;

&lt;p&gt;2. I fetch a row to edit independently on the list above&lt;br/&gt;
$object = Doctrine::getTable(&apos;ShopZbozi&apos;)-&amp;gt;find(123);&lt;/p&gt;

&lt;p&gt;3. edit properties of the object...&lt;/p&gt;

&lt;p&gt;4. $object-&amp;gt;replace();&lt;br/&gt;
the object is fetched with no related objects like &lt;span class=&quot;error&quot;&gt;&amp;#91;Uzivatel&amp;#93;&lt;/span&gt; or &lt;span class=&quot;error&quot;&gt;&amp;#91;Soubor&amp;#93;&lt;/span&gt;, so when I change for example $object-&amp;gt;iduzivatel (related Uzivatel object id) and save it is OK&lt;/p&gt;

&lt;p&gt;----------------BROKEN:&lt;br/&gt;
1. I fetch list in Pager&lt;br/&gt;
new Doctrine_Pager(Doctrine_Query::create()&lt;del&gt;&amp;gt;select(&apos;z.&lt;b&gt;,s.&lt;/b&gt;,o.*,u.jmeno as Vlo&#382;il,k.nazev_cs as Kategorie&apos;)&lt;/del&gt;&amp;gt;from(&apos;ShopZbozi z,z.Obrazek o,z.Soubor s,z.Uzivatel u,z.ShopKategorie k&apos;)&lt;del&gt;&amp;gt;orderby(&apos;z.nazev_cs ASC&apos;),$this&lt;/del&gt;&amp;gt;page,$this-&amp;gt;perpage);&lt;/p&gt;

&lt;p&gt;2. I fetch a row to edit independently on the list above    (in contrast to the first working example this $object is fetched with EMPTY RELATION OBJECTS, which causes inserting empty new rows when calling -&amp;gt;replace())&lt;br/&gt;
$object = Doctrine::getTable(&apos;ShopZbozi&apos;)-&amp;gt;find(123);&lt;/p&gt;

&lt;p&gt;3. edit properties of the object...&lt;/p&gt;

&lt;p&gt;4. $object-&amp;gt;replace(); &lt;br/&gt;
-&amp;gt; the $object has all the related object fetched as it was defined in the list in Pager - like it was used as a template for getTable and when -&amp;gt;replace() - new empty related objects are inserted in DB.&lt;/p&gt;


&lt;p&gt;I&apos;ve been using Doctrine for I guess 2 years now and I believe this bug/strange behavior has always been there.&lt;br/&gt;
Maybe I&apos;m wrong and it is not a bug, but the behavior is strange and it took me really long to find where the problem is and I still don&apos;t know how to use pager without influencing the later queries.&lt;br/&gt;
Thanx John Mathew&lt;/p&gt;</description>
                <environment>Debian testing squeeze 32 bit.</environment>
            <key id="10544">DC-312</key>
            <summary>Doctrine_Pager query &quot;influences&quot; Doctrine::getTable() query</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="seiffs">Jan Matousek</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Dec 2009 10:19:08 +0000</created>
                <updated>Wed, 2 Dec 2009 10:20:19 +0000</updated>
                                    <version>1.2.0</version>
                                                <component>Pager</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>