<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 22:49:24 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://doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=fixVersion+%3D+%222.3.3%22+AND+project+%3D+DDC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=fixVersion+%3D+%222.3.3%22+AND+project+%3D+DDC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="11" total="11"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2341] [GH-606] Don&apos;t add empty Expr to another one</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2341</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of jean-gui:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/606&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/606&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;Doctrine should not allow to add an empty Expr to another one. Current code allows that, which can lead to wrong DQL.&lt;br/&gt;
Example 1:&lt;br/&gt;
```php&lt;br/&gt;
$andExpr = $this-&amp;gt;_expr-&amp;gt;andx();&lt;br/&gt;
$andExpr-&amp;gt;add($this-&amp;gt;_expr-&amp;gt;andx());&lt;br/&gt;
$andExpr-&amp;gt;add($this-&amp;gt;_expr-&amp;gt;eq(1, 1));&lt;br/&gt;
echo $andExpr;&lt;br/&gt;
```&lt;br/&gt;
will output:&lt;br/&gt;
```sql&lt;br/&gt;
 AND 1 = 1&lt;br/&gt;
```&lt;br/&gt;
instead of:&lt;br/&gt;
```sql&lt;br/&gt;
1 = 1&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;Example 2:&lt;br/&gt;
```php&lt;br/&gt;
echo $andExpr;&lt;br/&gt;
```&lt;br/&gt;
will output:&lt;br/&gt;
```sql&lt;br/&gt;
 AND  AND &lt;br/&gt;
```&lt;br/&gt;
instead of nothing.&lt;/p&gt;

&lt;p&gt;IRC log of the discusion on #doctrine:&lt;br/&gt;
```irc&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:36:18&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       hi&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:36:35&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       I have a question about Doctrine/ORM/Query/Expr/Base.php&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:37:17&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       looking at the add function (&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/Expr/Base.php#L89&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/Expr/Base.php#L89&lt;/a&gt;), the first if seems wrong&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:37:39&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       [[ if ( $arg !== null || ($arg instanceof self &amp;amp;&amp;amp; $arg-&amp;gt;count() &amp;gt; 0) ) ]]&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:39:49&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       if $arg is not null, then it will get added even if $arg-&amp;gt;count === 0&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:41:03&amp;#93;&lt;/span&gt; &amp;lt;ocramius&amp;gt;       yes&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:41:42&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       that doesn&apos;t seem right, does it?&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:43:29&amp;#93;&lt;/span&gt; &amp;lt;ocramius&amp;gt;       why not?&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:43:34&amp;#93;&lt;/span&gt; &amp;lt;ocramius&amp;gt;       can you elaborate?&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:45:37&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       that &quot;if&quot; seems to be meaning that the function shouldn&apos;t add $arg if  $arg-&amp;gt;count() equals 0&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:45:45&amp;#93;&lt;/span&gt; &amp;lt;Ninj&amp;gt;   ocramius: i think Jean-Gui means that the right side of the OR will be called only if the left side is false, which means $arg is null. And if $arg is null it cannot be an object&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:46:07&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       right&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:46:30&amp;#93;&lt;/span&gt; &amp;lt;Ninj&amp;gt;   this condition is indeed bugged&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:47:12&amp;#93;&lt;/span&gt; &amp;lt;alcuadradoatwork&amp;gt;       I see Jean-Gui&apos;s point too&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:47:18&amp;#93;&lt;/span&gt; &amp;lt;ocramius&amp;gt;       write a test case then &lt;img class=&quot;emoticon&quot; src=&quot;http://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;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:47:24&amp;#93;&lt;/span&gt; &amp;lt;alcuadradoatwork&amp;gt;       maybe it works right, but it&apos;s confusing&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:48:07&amp;#93;&lt;/span&gt; &amp;lt;Ninj&amp;gt;   this condition will not throw any error because the &quot;instanceof&quot; will prevent the $arg::count function to be called on a null object, but it is still useless&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:48:20&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       I think [[ if ( $arg &lt;span class=&quot;error&quot;&gt;Unable to render embedded object: File (== null &amp;amp;&amp;amp; () not found.&lt;/span&gt;($arg instanceof self) || ($arg instanceof self &amp;amp;&amp;amp; $arg-&amp;gt;count() &amp;gt; 0)) ) ]] would work better&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:48:31&amp;#93;&lt;/span&gt;   * Jean-Gui will look into how to submit bug reports&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:48:49&amp;#93;&lt;/span&gt; &amp;lt;alcuadradoatwork&amp;gt;       isn&apos;t this enough?  if ($arg instanceof self &amp;amp;&amp;amp; $arg-&amp;gt;count() &amp;gt; 0)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:49:18&amp;#93;&lt;/span&gt; &amp;lt;Ninj&amp;gt;   i think it is, alcuadradoatwork&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:49:28&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       no, because if $arg is not an instance of self, I think we still want to add it&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:49:45&amp;#93;&lt;/span&gt; &amp;lt;ocramius&amp;gt;       alcuadradoatwork: again... if it is a buggy condition, write a small test and open a PR &lt;img class=&quot;emoticon&quot; src=&quot;http://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;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:50:03&amp;#93;&lt;/span&gt; &amp;lt;alcuadradoatwork&amp;gt;       ocramius, it depends on your definition of &quot;buggy&quot;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:50:32&amp;#93;&lt;/span&gt; &amp;lt;alcuadradoatwork&amp;gt;       it won&apos;t damage the behavior of the software, but it&apos;s quality its kind of pour&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:51:19&amp;#93;&lt;/span&gt; &amp;lt;ocramius&amp;gt;       alcuadradoatwork: yes, still it needs coverage. I didn&apos;t say it needs a &lt;em&gt;FAILING&lt;/em&gt; test&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:51:38&amp;#93;&lt;/span&gt; &amp;lt;alcuadradoatwork&amp;gt;       I see your point&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:51:47&amp;#93;&lt;/span&gt; &amp;lt;Ninj&amp;gt;   if the logic is :  &quot;add any non-null object, but if it&apos;s self so add it only if count&amp;gt;0&quot; then it must be rewriten&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:52:46&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       $args should be added if it&apos;s an instance of self or $_allowedClasses&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:53:16&amp;#93;&lt;/span&gt; &amp;lt;Ninj&amp;gt;   hum&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:53:37&amp;#93;&lt;/span&gt; &amp;lt;Ninj&amp;gt;   $args should be added if it&apos;s an instance of self with count &amp;gt; 0 or any other $_allowedClasse&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:53:55&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       yes, Ninj&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:55:01&amp;#93;&lt;/span&gt; &amp;lt;Jean-Gui&amp;gt;       thanks for your help guys, I&apos;ll submit a bug report with some test cases&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;jeudi 7 mars 2013&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;14:55:43&amp;#93;&lt;/span&gt; &amp;lt;Ninj&amp;gt;   your welcome Jean-Gui&lt;br/&gt;
```&lt;/p&gt;
</description>
                <environment></environment>
            <key id="14678">DDC-2341</key>
            <summary>[GH-606] Don&apos;t add empty Expr to another one</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Mar 2013 16:15:04 +0000</created>
                <updated>Tue, 12 Mar 2013 18:20:26 +0000</updated>
                    <resolved>Tue, 12 Mar 2013 18:19:12 +0000</resolved>
                                            <fixVersion>2.3.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19837" author="beberlei" created="Tue, 12 Mar 2013 18:20:26 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-606&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/606&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/606&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2340] Using Criteria matching on non-initialized collections ignore changes made on loaded entities</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2340</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;you have a non initialized collection (association between entities)&lt;/li&gt;
	&lt;li&gt;you have loaded some entities that are in that collection and changed some fields (without flushing)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If you do a matching using a Criteria on the collection (&lt;a href=&quot;http://docs.doctrine-project.org/en/latest/reference/working-with-associations.html#filtering-collections&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/latest/reference/working-with-associations.html#filtering-collections&lt;/a&gt;), then the Criteria will be executed through a DB query. But the fields you changed are not updated in the DB, so if you filter/order on those fields, then the result of the filter() will be incorrect.&lt;/p&gt;

&lt;p&gt;However, if your collection was initialized, the Criteria matching will be done in memory on the ArrayCollection and the result will be correct.&lt;/p&gt;

&lt;p&gt;So we have the problem for Criteria filtering on non-initialized collections.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14676">DDC-2340</key>
            <summary>Using Criteria matching on non-initialized collections ignore changes made on loaded entities</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mnapoli">Matthieu Napoli</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Mar 2013 13:49:18 +0000</created>
                <updated>Tue, 12 Mar 2013 21:54:35 +0000</updated>
                    <resolved>Tue, 12 Mar 2013 21:54:17 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.3.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19848" author="beberlei" created="Tue, 12 Mar 2013 21:54:35 +0000"  >&lt;p&gt;Fixed and merged for 2.3.3&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2323] [GH-593] Fix SimpleObjectHydrator behavior when column not exists in fieldMappings, relationMappings and metaMappings</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2323</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of norzechowicz:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/593&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/593&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/dbal/commit/88c1975dda492f3dd93cddea71ebacb40ed7efa5&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/commit/88c1975dda492f3dd93cddea71ebacb40ed7efa5&lt;/a&gt; change seems to make unable to use ``findOneBy()`` method because of ``doctrine_rownum`` added to query.&lt;/p&gt;

&lt;p&gt;``findOneBy()`` throws:&lt;/p&gt;

&lt;p&gt;&amp;gt;Notice: Undefined index: doctrine_rownum in &lt;br/&gt;
 ...\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator.php line 183&lt;/p&gt;</description>
                <environment></environment>
            <key id="14642">DDC-2323</key>
            <summary>[GH-593] Fix SimpleObjectHydrator behavior when column not exists in fieldMappings, relationMappings and metaMappings</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Feb 2013 09:16:55 +0000</created>
                <updated>Thu, 14 Mar 2013 22:00:08 +0000</updated>
                    <resolved>Thu, 14 Mar 2013 22:00:08 +0000</resolved>
                                            <fixVersion>2.3.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2310] Recent changes to DBAL SQL Server platform lock hinting breaks ORM SqlWalker in DQL queries with joins</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2310</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The SQL Server platform throws an error when you try to run DQL with JOIN statements.&lt;/p&gt;

&lt;p&gt;The breaking change was in the DBAL SQL Server platform &amp;#8211; it was changed to add a &apos; WITH (NOLOCK)&apos; to the appendLockHint function. Change was in &lt;a href=&quot;https://github.com/doctrine/dbal/commit/6af7845cc3779176ec7e111200fe69654179eaf8#L0R851&quot; class=&quot;external-link&quot;&gt;this rev&lt;/a&gt;. The change in DBAL is not wrong, it just highlighted the bug in the ORM...&lt;/p&gt;


&lt;p&gt;The ORM SqlWalker runs the appendLockHint function against a generated FROM / JOIN clause in the walkFromClause func &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/1bcda5147a890a8f419eb333df69852bd4f6b307/lib/Doctrine/ORM/Query/SqlWalker.php#L777&quot; class=&quot;external-link&quot;&gt;here&lt;/a&gt;. This is actually the wrong place to append lock hints. This is generating the FROM clause like:&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; FROM foo f0_ LEFT JOIN foo_bar f1_ ON f0_.id = f1_.foo_id LEFT JOIN bar b2_ ON f1_.bar_id = b2_.id WITH (NOLOCK)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;When it should actually generate something like:&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; FROM foo f0_ WITH (NOLOCK) LEFT JOIN foo_bar f1_ WITH (NOLOCK) ON f0_.id = f1_.foo_id LEFT JOIN bar b2_ WITH (NOLOCK) ON f1_.bar_id = b2_.id&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; It should append lock hints after the table alias.&lt;/p&gt;

&lt;p&gt;I think the only reason this hasn&apos;t shown up before is that the other lock hint types haven&apos;t been applied in this way before, if at all.&lt;/p&gt;</description>
                <environment>SQL Server</environment>
            <key id="14513">DDC-2310</key>
            <summary>Recent changes to DBAL SQL Server platform lock hinting breaks ORM SqlWalker in DQL queries with joins</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="wschalle">William Schaller</reporter>
                        <labels>
                        <label>dbal</label>
                        <label>lockhints</label>
                        <label>orm</label>
                        <label>sqlserver</label>
                        <label>sqlsrv</label>
                    </labels>
                <created>Thu, 21 Feb 2013 17:46:19 +0000</created>
                <updated>Thu, 21 Feb 2013 19:51:37 +0000</updated>
                    <resolved>Thu, 21 Feb 2013 18:04:07 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.3.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19583" author="stof" created="Thu, 21 Feb 2013 19:38:07 +0000"  >&lt;p&gt;I think the line appending the lock should be moved to &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/1bcda5147a890a8f419eb333df69852bd4f6b307/lib/Doctrine/ORM/Query/SqlWalker.php#L796&quot; class=&quot;external-link&quot;&gt;this place&lt;/a&gt; to achieve the result displayed above.&lt;/p&gt;

&lt;p&gt;But it may cause issues with some other vendor.&lt;/p&gt;</comment>
                    <comment id="19584" author="wschalle" created="Thu, 21 Feb 2013 19:51:26 +0000"  >&lt;p&gt;@Christophe I considered that too. None of the other platforms implement the appendLockHint function. None of the other platforms implement this because it is handled differently on other platforms &amp;#8211; with transaction isolation levels and such.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2300] Xmldriver does not convert the version field to boolean but keeps it as a SimpleXMLElement which breaks serialization</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2300</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Serialization breaks because the cache driver tries to serialize the ClassMetaData instance containing a simplexml element:&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\ORM\Mapping\ClassMetadata &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;
(
    [fieldMappings] =&amp;gt; Array
        (
            [version] =&amp;gt; Array
                (
                    [fieldName] =&amp;gt; version
                    [type] =&amp;gt; integer
                    [columnName] =&amp;gt; version
                    [version] =&amp;gt; SimpleXMLElement &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;
                        (
                            [0] =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
                        )

                    [&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;] =&amp;gt; 1
                    [declared] =&amp;gt; path to entity
                )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The fix is simple change in the columnToArray method in the XML driver class:&lt;/p&gt;

&lt;p&gt;changing:&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;
$mapping[&apos;version&apos;] = $fieldMapping[&apos;version&apos;];
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to:&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;
$mapping[&apos;version&apos;] = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;evaluateBoolean($fieldMapping[&apos;version&apos;]);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14487">DDC-2300</key>
            <summary>Xmldriver does not convert the version field to boolean but keeps it as a SimpleXMLElement which breaks serialization</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jaco">Jaco Stienstra</reporter>
                        <labels>
                    </labels>
                <created>Sat, 16 Feb 2013 18:18:44 +0000</created>
                <updated>Thu, 14 Mar 2013 22:22:17 +0000</updated>
                    <resolved>Thu, 14 Mar 2013 22:22:17 +0000</resolved>
                            <version>2.3.2</version>
                                <fixVersion>2.3.3</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2282] [GH-572] Fixed SQLServer ORDER BY problem in paginator CountOutputWalker</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2282</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of norzechowicz:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/572&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/572&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;Code explains everything &lt;img class=&quot;emoticon&quot; src=&quot;http://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;</description>
                <environment></environment>
            <key id="14462">DDC-2282</key>
            <summary>[GH-572] Fixed SQLServer ORDER BY problem in paginator CountOutputWalker</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Feb 2013 13:46:40 +0000</created>
                <updated>Tue, 12 Mar 2013 18:06:53 +0000</updated>
                    <resolved>Tue, 12 Mar 2013 18:06:53 +0000</resolved>
                                            <fixVersion>2.3.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2246] ORM\UnitOfWork::getEntityState() crash when using a new Entity with association composite key</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2246</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I already found a similar issue report but it seems to be not solved completely:&lt;/p&gt;

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

&lt;p&gt;I did something like this (mock): (Metadata cache is OFF)&lt;br/&gt;
$someCompositeEntity = new SomeCompositeEntity;&lt;br/&gt;
$someCompositeEntity-&amp;gt;setUser($userEntity);&lt;br/&gt;
$someCompositeEntity-&amp;gt;setAnotherRelation($anotherRelationEntity);&lt;/p&gt;

&lt;p&gt;// Note: $userEntity &amp;amp; $anotherRelationEntity are managed by UOW.&lt;/p&gt;

&lt;p&gt;$uow = $em-&amp;gt;getUnitOfWork();&lt;br/&gt;
var_dump($uow-&amp;gt;getEntityState($someCompositeEntity));&lt;/p&gt;

&lt;p&gt;&amp;#8211; EXPECTED: &amp;#8211;&lt;br/&gt;
bool(false)&lt;/p&gt;

&lt;p&gt;&amp;#8211; ACTUAL RESULT: &amp;#8211;&lt;br/&gt;
&amp;lt;h1&amp;gt;PHP Error &lt;span class=&quot;error&quot;&gt;&amp;#91;4096&amp;#93;&lt;/span&gt;&amp;lt;/h1&amp;gt;&lt;br/&gt;
&amp;lt;p&amp;gt;Object of class Application\Model\Db\Entity\User could not be converted to string (/Users/keksnicoh/lokalhorst/FinQ/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2754)&amp;lt;/p&amp;gt;&lt;br/&gt;
&amp;lt;pre&amp;gt;#0 unknown(0): CWebApplication-&amp;gt;handleError()&lt;br/&gt;
#1 /Users/keksnicoh/lokalhorst/FinQ/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(2754): implode()&lt;br/&gt;
#2 /Users/keksnicoh/lokalhorst/FinQ/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1389): Doctrine\ORM\UnitOfWork-&amp;gt;tryGetById()&lt;br/&gt;
#3 /Users/keksnicoh/lokalhorst/FinQ/Application/Model/Db/Model/AnswerCommentRating.php(42): Doctrine\ORM\UnitOfWork-&amp;gt;getEntityState()&lt;/p&gt;

&lt;p&gt;As you see the metadatainfo tries to convert the composite objects to strings, instead of getting the identifiers from the objects.&lt;/p&gt;

&lt;p&gt;greetz&lt;br/&gt;
keksnicoh&lt;/p&gt;</description>
                <environment></environment>
            <key id="14390">DDC-2246</key>
            <summary>ORM\UnitOfWork::getEntityState() crash when using a new Entity with association composite key</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="keksnicoh">keks nicoh</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Jan 2013 15:48:40 +0000</created>
                <updated>Sun, 20 Jan 2013 19:13:06 +0000</updated>
                    <resolved>Sun, 20 Jan 2013 19:13:06 +0000</resolved>
                            <version>2.3.2</version>
                                <fixVersion>2.3.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19353" author="beberlei" created="Sun, 20 Jan 2013 19:13:06 +0000"  >&lt;p&gt;Fixed and merged into 2.3.x branch&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2243] Inconsistent PHP Type for &quot;bigint&quot; columns</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2243</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It seems like columns of type &quot;bigint&quot; have no consistent PHP type.&lt;/p&gt;

&lt;p&gt;If an object is read from the database, the database value seems to be cast to&lt;br/&gt;
a PHP string. However, directly after persisting an entity using an id generation strategy of &quot;AUTO&quot; the type is a PHP integer.&lt;/p&gt;

&lt;p&gt;I think it would make sense to use a PHP string for both cases as you otherwise can run into problems if you use shallow comparisons such as &quot;===&quot;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14387">DDC-2243</key>
            <summary>Inconsistent PHP Type for &quot;bigint&quot; columns</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Jan 2013 09:45:38 +0000</created>
                <updated>Sun, 20 Jan 2013 19:35:33 +0000</updated>
                    <resolved>Sun, 20 Jan 2013 19:35:33 +0000</resolved>
                                            <fixVersion>2.3.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2231] [GH-546] The EntityManager was not injected in uninitialized proxys which are Obj...</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2231</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of stefankleff:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/546&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/546&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;...ectManagerAware.&lt;/p&gt;

&lt;p&gt;I ran into that problem while I had two objects in the identitymap while hydrating a collection: one was new a &quot;real&quot; entity and the other one was an uninitialized proxy. For &quot;real&quot; entities the em is injected in line 2427, for new entities it is injected in 2436-&amp;gt;2364, but for proxies this is missing. According to the comment &quot;inject ObjectManager into just loaded proxies.&quot; the code in line 2427 should do this, but in fact it is just used if it is a &quot;real&quot; entity or an already initialized proxy. Moving the injection to outside of the condition in line 2411 (if the entity is an unitialized proxy) solves this.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14370">DDC-2231</key>
            <summary>[GH-546] The EntityManager was not injected in uninitialized proxys which are Obj...</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Jan 2013 13:56:36 +0000</created>
                <updated>Sat, 12 Jan 2013 09:33:43 +0000</updated>
                    <resolved>Sat, 12 Jan 2013 09:33:43 +0000</resolved>
                                            <fixVersion>2.3.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19288" author="beberlei" created="Sat, 12 Jan 2013 09:29:46 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-546&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/546&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/546&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2090] MultiTableUpdateExecutor works incorrect with query cache enabled</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2090</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Doctrine\ORM\Query\Exec\MultiTableUpdateExecutor works incorrect with query cache enabled.&lt;br/&gt;
I execute two similar update-queries with different parameters, but the second query is never executed in database.&lt;/p&gt;

&lt;p&gt;There is todo-task in code:&lt;/p&gt;

&lt;p&gt;//FIXME (URGENT): With query cache the parameter is out of date. Move to execute() stage.&lt;/p&gt;

&lt;p&gt;This is important issue. Much time spent in debugging.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14147">DDC-2090</key>
            <summary>MultiTableUpdateExecutor works incorrect with query cache enabled</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="feedbee">Valera Leontyev</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Oct 2012 13:39:45 +0000</created>
                <updated>Sun, 17 Mar 2013 20:50:48 +0000</updated>
                    <resolved>Sun, 17 Mar 2013 20:40:44 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                <fixVersion>2.3.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18852" author="feedbee" created="Fri, 19 Oct 2012 13:40:49 +0000"  >&lt;p&gt;Workaround is to disable query cache per every multitable update query: &lt;a href=&quot;http://stackoverflow.com/questions/12969460/doctrine-query-cache-update&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/12969460/doctrine-query-cache-update&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19870" author="fabio.bat.silva" created="Sun, 17 Mar 2013 20:40:44 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/60b8bc63a1a4819cf112cfbbc7cca06b5792aba6&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/60b8bc63a1a4819cf112cfbbc7cca06b5792aba6&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19871" author="beberlei" created="Sun, 17 Mar 2013 20:50:48 +0000"  >&lt;p&gt;Merged into 2.3 for release with 2.3.3&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1666] orphanRemoval does not work with oneToOne: Duplicate entry Error</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1666</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;orphanRemoval does not work with oneToOne.&lt;br/&gt;
Im getting &quot;duplicate entry&quot; errors after replacing the oneToOne object.&lt;br/&gt;
Doctrine seems to insert the new data before removing the old one.&lt;br/&gt;
if i remove the unique constraint by hand in the database it works.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Mysql Error&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/*
Error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &apos;1&apos; &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; key &apos;UNIQ_9D8DDB05579B502F&apos;
*/
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Models and YAML Mapping&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/*
Contact:
  type: entity
  table: contact
  fields:
    _id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      generator:
        strategy: AUTO
      column: id
  oneToOne:
    _standingData:
      targetEntity: StandingData
      mappedBy: _contact
      cascade: [&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;merge&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;] 
      orphanRemoval: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
*/

class Contact
{
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_id;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_standingData;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function newStandingData(StandingData $sd)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_standingData = $sd;
        $sd-&amp;gt;setContact($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
    }
}

/*
StandingData:
  type: entity
  table: standing_data
  fields:
    _id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      generator:
        strategy: AUTO
      column: id
  oneToOne:
    _contact:
      targetEntity: Contact
      inversedBy: _standingData
      joinColumns:
        contact_id:
          referencedColumnName: id
          onDelete: cascade
*/

class StandingData
{
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_id;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_contact;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setContact(Contact $c)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_contact = $c;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Script&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// Create &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Contact
&lt;/span&gt;$contact = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Contact();
$contact-&amp;gt;newStandingData(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \StandingData());
$em-&amp;gt;persist($contact);
$em-&amp;gt;flush();

&lt;span class=&quot;code-comment&quot;&gt;// Try to change StandingData
&lt;/span&gt;$contact-&amp;gt;newStandingData(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \StandingData());
$em-&amp;gt;flush();


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13471">DDC-1666</key>
            <summary>orphanRemoval does not work with oneToOne: Duplicate entry Error</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gutzuwissen">Mario Knippfeld</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Feb 2012 09:31:48 +0000</created>
                <updated>Thu, 14 Mar 2013 22:43:25 +0000</updated>
                    <resolved>Thu, 14 Mar 2013 22:43:25 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.3.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="17586" author="beberlei" created="Wed, 14 Mar 2012 21:47:38 +0000"  >&lt;p&gt;This is a necessary restriction for the internals of Doctrine to always work correctly.&lt;/p&gt;</comment>
                    <comment id="17841" author="acasademont" created="Thu, 12 Apr 2012 18:01:04 +0000"  >&lt;p&gt;+1 on this one. So what&apos;s the point of orphanRemoval in OneToOne if it can never be done? Maybe onetoones should not create a unique index but a normal one.&lt;/p&gt;

&lt;p&gt;If it is really a won&apos;t fix, then the docs should reflect that.&lt;/p&gt;</comment>
                    <comment id="17842" author="acasademont" created="Thu, 12 Apr 2012 18:05:18 +0000"  >&lt;p&gt;BTW, as a workaround, i suggest converting this OneToOne case (where the orphanRemoval is in the inverse side) into a ManyToOne so a normal index will be created, not a unique one. Then the new row is inserted fine and the old one is deleted afterwards.&lt;/p&gt;</comment>
                    <comment id="17905" author="gutzuwissen" created="Fri, 4 May 2012 10:39:21 +0000"  >&lt;p&gt;+1&lt;br/&gt;
like Albert said, if its really a wont fix, the docs should state that.&lt;br/&gt;
the example in: &lt;a href=&quot;http://readthedocs.org/docs/doctrine-orm/en/latest/reference/working-with-associations.html?highlight=orphan#orphan-removal&quot; class=&quot;external-link&quot;&gt;http://readthedocs.org/docs/doctrine-orm/en/latest/reference/working-with-associations.html?highlight=orphan#orphan-removal&lt;/a&gt; with a (bidirectional) oneToOne  orphanRemoval association isnt working with mysql and having doctrine created the tables.&lt;br/&gt;
maybe the bidirectional association is the problem?&lt;/p&gt;</comment>
                    <comment id="19527" author="mnapoli" created="Mon, 11 Feb 2013 11:39:04 +0000"  >&lt;p&gt;+1 same for me&lt;/p&gt;

&lt;p&gt;If the example of the docs isn&apos;t supposed to work (i.e. orphanRemoval with oneToOne isn&apos;t supported), then the docs should be updated.&lt;/p&gt;

&lt;p&gt;I can do a PR, but I need you to confirm it&apos;s really the case &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="19860" author="beberlei" created="Thu, 14 Mar 2013 22:29:00 +0000"  >&lt;p&gt;Its indeed a good fix to disable the unique constraint if orphan removal isset.&lt;/p&gt;</comment>
                    <comment id="19861" author="beberlei" created="Thu, 14 Mar 2013 22:43:25 +0000"  >&lt;p&gt;Fixed and merged into 2.3&lt;/p&gt;

&lt;p&gt;With the change Doctrine will not create unique indexes anymore on Orphan Removal OneToOne associations. You need to change the database schema for this change to take effect essentially.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>