<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 15:23:37 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+DDC+AND+fixVersion+%3D+%222.2.1%22+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC&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+DDC+AND+fixVersion+%3D+%222.2.1%22+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="17" total="17"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-1655] PostLoad not getting fired</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1655</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It appears that @PostLoad is not getting fired in 2.2.0.  I have an entity with a list of OneToMany objects.  The objects in the one-to-many list have @PostLoad method defined.  Using the find method on EntityManager, I can pull in the entity:&lt;/p&gt;

&lt;p&gt;$object = EntityManager-&amp;gt;find(&apos;entity\path\&apos;, $id);&lt;/p&gt;

&lt;p&gt;then:&lt;/p&gt;

&lt;p&gt;$list = $object-&amp;gt;getList();&lt;br/&gt;
foreach($list as $item) {&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Each &quot;item&quot; has a @PostLoad method defined. This PostLoad method on each $item gets called successfully in 2.1.5, but it doesn&apos;t appear to be getting called in 2.2.0.&lt;/p&gt;

&lt;p&gt;This is my first time submitting a bug, so let me know if you need anything else.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13457">DDC-1655</key>
            <summary>PostLoad not getting fired</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dswindle">Denny Swindle</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Feb 2012 23:11:00 +0000</created>
                <updated>Wed, 14 Mar 2012 11:03:32 +0000</updated>
                    <resolved>Wed, 14 Mar 2012 11:03:32 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17434" author="beberlei" created="Fri, 17 Feb 2012 21:43:25 +0000"  >&lt;p&gt;Are the One To many part of an inheritance hierachy? Then this could be related to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1640&quot; title=&quot;Actual classMetadata is not used when entity with DiscriminatorMap is hydrated, instead AbstractClass metaData is used.&quot;&gt;&lt;del&gt;DDC-1640&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17437" author="beberlei" created="Fri, 17 Feb 2012 22:30:31 +0000"  >&lt;p&gt;Please report if &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1640&quot; title=&quot;Actual classMetadata is not used when entity with DiscriminatorMap is hydrated, instead AbstractClass metaData is used.&quot;&gt;&lt;del&gt;DDC-1640&lt;/del&gt;&lt;/a&gt; fixes your issue. I keep this bug open as long.&lt;/p&gt;</comment>
                    <comment id="17564" author="dswindle" created="Tue, 13 Mar 2012 20:01:48 +0000"  >&lt;p&gt;It looks like release 2.2.1 fixes this issue.  Thanks so much&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1668] bug with reading cached annotations in Annotation driver</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1668</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I had a problem with Class Table Inheritance on first call of a child entity it was working but if call another child in another instance it was not joining with the parent class. After some debugging i found the problem it was not detecting the annotation that is a parent entity to be joined in Doctrine\ORM\Mapping\Driver\AnnotationDriver when the function on line 479 isTransient($className) is called. So after more debugging i found the problem it is in &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;is_int(key($classAnnotations))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Looks like that after it is cached in and then the cache is read when it returns the array of annotations for the entity class the keys are returned as strings not as integer and if the key is &apos;0&apos; the the value that is_int returns is NULL so the check &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;if&lt;/span&gt; ($classAnnotations &amp;amp;&amp;amp; is_int(key($classAnnotations))) 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;fails and it does not foreach the the array of annotations. &lt;br/&gt;
Also i found that you are making that check in a couple of places so I maid a quick fix for my self in the Doctrine\Common\Annotations\CachedReader which is if annotations are found that are cached before returning them i call array_values &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-comment&quot;&gt;// Attempt to grab data from cache
&lt;/span&gt;        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (($data = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;cache-&amp;gt;fetch($cacheKey)) !== &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;) {
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;debug || $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;isCacheFresh($cacheKey, $class)) {
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array_values($data);
            }
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I am using APC cache.  &lt;/p&gt;</description>
                <environment></environment>
            <key id="13477">DDC-1668</key>
            <summary>bug with reading cached annotations in Annotation driver</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.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="vigor_bg">victor Velkov</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Feb 2012 15:04:59 +0000</created>
                <updated>Sat, 3 Mar 2012 21:25:54 +0000</updated>
                    <resolved>Sat, 3 Mar 2012 21:25:54 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17509" author="beberlei" created="Sat, 3 Mar 2012 21:25:54 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1678] When many to many changes but no fields, listeners don&apos;t get notified about update.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1678</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/256&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/256&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13491">DDC-1678</key>
            <summary>When many to many changes but no fields, listeners don&apos;t get notified about update.</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 3 Mar 2012 21:15:13 +0000</created>
                <updated>Sat, 3 Mar 2012 21:19:21 +0000</updated>
                    <resolved>Sat, 3 Mar 2012 21:19:21 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.1.7</fixVersion>
                <fixVersion>2.2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17508" author="beberlei" created="Sat, 3 Mar 2012 21:19:21 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1660] Annotation @version is not allowed to be declared on class</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1660</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I upgraded to Doctrine 2.2 and got following exception:&lt;/p&gt;

&lt;p&gt;&quot;Doctrine\Common\Annotations\AnnotationException &lt;span class=&quot;error&quot;&gt;&amp;#91;Semantical Error&amp;#93;&lt;/span&gt; Annotation @version is not allowed to be declared on class SomeEntityClass. You may only use this annotation on these code elements: PROPERTY.&quot;&lt;/p&gt;

&lt;p&gt;In Doctrine 2.1 no such exception has been thrown. I use following annotation for all my classes in my projects:&lt;/p&gt;

&lt;p&gt;@version $Id: SomeEntityClass.php 509 2012-02-03 09:38:48Z mf $&lt;/p&gt;

&lt;p&gt;Thus I cannot upgrade to Doctrine 2.2 for now.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13463">DDC-1660</key>
            <summary>Annotation @version is not allowed to be declared on class</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>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="fedys">Miroslav Fedeles</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Feb 2012 09:10:10 +0000</created>
                <updated>Sat, 3 Mar 2012 20:54:07 +0000</updated>
                    <resolved>Sat, 3 Mar 2012 20:54:07 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17454" author="beberlei" created="Mon, 20 Feb 2012 10:37:22 +0000"  >&lt;p&gt;Hm maybe the SimpleAnnotationReader should not validate targets? What do you say Fabio/Johannes?&lt;/p&gt;</comment>
                    <comment id="17455" author="beberlei" created="Mon, 20 Feb 2012 10:38:37 +0000"  >&lt;p&gt;Its definately a BC break.&lt;/p&gt;</comment>
                    <comment id="17459" author="fabio.bat.silva" created="Mon, 20 Feb 2012 14:19:33 +0000"  >&lt;p&gt;Hi Benjamin&lt;/p&gt;

&lt;p&gt;This parser identifies the phpdoc annotation @version as the doctrine annotation @Doctrine\ORM\Mapping\Version&lt;/p&gt;

&lt;p&gt;SimpleReader does not recognize entity imports. If consider the namespaces (SimpleAnnotationReader#addNamespace), this annotation exists within the namespace &quot;Doctrine\ORM\Mapping\&quot;&lt;/p&gt;

&lt;p&gt;This could be fixed considering just CamelCaseClasses, so @version is not equal @Version&lt;/p&gt;

&lt;p&gt;Benjamin and Johannes, please take a look at this commit : &lt;br/&gt;
&lt;a href=&quot;https://github.com/FabioBatSilva/common/commit/842bf5883c405e89d211e5ccfff1d8d64e05a486&quot; class=&quot;external-link&quot;&gt;https://github.com/FabioBatSilva/common/commit/842bf5883c405e89d211e5ccfff1d8d64e05a486&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17462" author="beberlei" created="Mon, 20 Feb 2012 14:43:11 +0000"  >&lt;p&gt;This breaks BC, so we cant do this.&lt;/p&gt;</comment>
                    <comment id="17506" author="beberlei" created="Sat, 3 Mar 2012 20:54:07 +0000"  >&lt;p&gt;Merged PR into master and 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1652] ArrayHydrator with composite primary key</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1652</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi.&lt;/p&gt;

&lt;p&gt;Problem with ArrayHydrator and composite primary key.&lt;/p&gt;

&lt;p&gt;Given the following data (PRIMARY KEY (`ancestor_id`,`descendant_id`))&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;ancestor_id&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;descendant_id&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;depth&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;2&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&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;$query = $em-&amp;gt;createQuery(&lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT c,d FROM ResourceClosure c JOIN c.descendant d WHERE c.ancestor = 1&quot;&lt;/span&gt;);

echo &apos;ObjectHydrator result count = &apos;.count($query-&amp;gt;getResult()).PHP_EOL;
echo &apos;ArrayHydrator result count = &apos;.count($query-&amp;gt;getArrayResult()).PHP_EOL;
&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;Output&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;ObjectHydrator result count = 2 
ArrayHydrator result count = 1 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Expected both counts are equals 2.&lt;br/&gt;
In case getArrayResult() in result only first record hydrated, second record are ommited&lt;/p&gt;


&lt;p&gt;Below examples model and insertion in db&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;ResourceClosure&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Entity
 */
class ResourceClosure
{
    /**
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Resource&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ancestor_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     *
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $ancestor;

    /**
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Resource&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;descendant_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Resource
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $descendant;

    /**
     * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;depth&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $depth;
}
&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;Insertion&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$resource1 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Entity\Resource(&apos;resource1&apos;);
$em-&amp;gt;persist($resource1);

$resource2 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Entity\Resource(&apos;resource2&apos;);
$em-&amp;gt;persist($resource2);

$em-&amp;gt;flush();

$closure1 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Entity\ResourceClosure();
$closure1-&amp;gt;setAncestor($resource1)
                -&amp;gt;setDescendant($resource1)
                -&amp;gt;setDepth(0);

$em-&amp;gt;persist($closure1);


$closure2= &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Entity\ResourceClosure();
$closure2-&amp;gt;setAncestor($resource1)
                -&amp;gt;setDescendant($resource2)
                -&amp;gt;setDepth(1);

$em-&amp;gt;persist($closure2);


$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;P.S.&lt;br/&gt;
Its work like expected in case entity ResourceClosure has simple primary key.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13451">DDC-1652</key>
            <summary>ArrayHydrator with composite primary key</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ghennady">Gandzy Ghennady</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Feb 2012 11:17:09 +0000</created>
                <updated>Sat, 3 Mar 2012 20:11:53 +0000</updated>
                    <resolved>Sat, 3 Mar 2012 18:47:48 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17464" author="beberlei" created="Mon, 20 Feb 2012 16:23:46 +0000"  >&lt;p&gt;Verified&lt;/p&gt;</comment>
                    <comment id="17465" author="beberlei" created="Mon, 20 Feb 2012 16:28:54 +0000"  >&lt;p&gt;@Guilherme - This is because the SQL Walker decides to $addMetaColumns =&amp;gt; false here. Why did we add this? This skips all meta columns in Array Results, i don&apos;t get what that is good for.&lt;/p&gt;</comment>
                    <comment id="17466" author="beberlei" created="Mon, 20 Feb 2012 16:50:17 +0000"  >&lt;p&gt;PR: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/290&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/290&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Guilherme has to verify this&lt;/p&gt;</comment>
                    <comment id="17499" author="guilhermeblanco" created="Sat, 3 Mar 2012 18:47:48 +0000"  >&lt;p&gt;Resolved with merge of &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/290&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/290&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17500" author="beberlei" created="Sat, 3 Mar 2012 20:11:53 +0000"  >&lt;p&gt;Merged back to 2.2, will be in 2.2.1&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1667] UniqueConstraint without a &apos;name&apos; attribute generates Syntax  error under postgre</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1667</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;UniqueConstraints without a &apos;name&apos; attribute generates syntax  error on PGSQL ( no error on MSQL )&lt;/p&gt;

&lt;p&gt;got a &quot; Syntax error: 7 ERROR:  syntax error at or near &quot;ON&quot;  &quot;&lt;/p&gt;

&lt;p&gt;took me little time to figure out ... &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;Edit: That was using anotations.&lt;/p&gt;</description>
                <environment>Ubuntu</environment>
            <key id="13474">DDC-1667</key>
            <summary>UniqueConstraint without a &apos;name&apos; attribute generates Syntax  error under postgre</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</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="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="azer">Adrien Delorme</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 Feb 2012 15:28:10 +0000</created>
                <updated>Sat, 3 Mar 2012 18:45:21 +0000</updated>
                    <resolved>Sat, 3 Mar 2012 18:06:31 +0000</resolved>
                            <version>2.1.6</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17495" author="guilhermeblanco" created="Sat, 3 Mar 2012 18:06:31 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/a47e5663828d54852ff67251acef8bdab0c331c8&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/a47e5663828d54852ff67251acef8bdab0c331c8&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17496" author="beberlei" created="Sat, 3 Mar 2012 18:11:38 +0000"  >&lt;p&gt;Merged into 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1673] ProxyFactory method generateProxyClasses argument $toDir does not affect anything</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1673</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;See my note in the github changeset - &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/a029b284234065a03dab4241b29f0325975eeac6#L1L116&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/a029b284234065a03dab4241b29f0325975eeac6#L1L116&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Full method code on the master - &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L116&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L116&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13483">DDC-1673</key>
            <summary>ProxyFactory method generateProxyClasses argument $toDir does not affect anything</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>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="gedrox">Aigars Gedroics</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Feb 2012 11:31:50 +0000</created>
                <updated>Sat, 3 Mar 2012 18:45:04 +0000</updated>
                    <resolved>Sat, 3 Mar 2012 18:24:53 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2.1</fixVersion>
                <fixVersion>2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17497" author="guilhermeblanco" created="Sat, 3 Mar 2012 18:24:53 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/bf80ee6a30f04aed406a3253ef7459b4fcf11bda&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/bf80ee6a30f04aed406a3253ef7459b4fcf11bda&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17498" author="beberlei" created="Sat, 3 Mar 2012 18:45:04 +0000"  >&lt;p&gt;Merged into 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1661] No unique join column fields for Single Table inheritance type.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1661</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/273&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/273&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13465">DDC-1661</key>
            <summary>No unique join column fields for Single Table inheritance type.</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Feb 2012 14:54:18 +0000</created>
                <updated>Mon, 20 Feb 2012 14:56:47 +0000</updated>
                    <resolved>Mon, 20 Feb 2012 14:56:47 +0000</resolved>
                            <version>2.1.6</version>
                <version>2.2</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1654] OrphanRemoval does not work with One-To-Many, Unidirectional with Join Table</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1654</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;OrphanRemoval is only allowed for one-to-one and one-to-many mappings. But using One-To-Many, Unidirectional with Join Table, the relation will be declared as Many-To-Many with a unique contraint, but the orphan removal flag doesn&apos;t work in this case (but should).&lt;/p&gt;</description>
                <environment></environment>
            <key id="13456">DDC-1654</key>
            <summary>OrphanRemoval does not work with One-To-Many, Unidirectional with Join Table</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="prolic">Sascha-Oliver Prolic</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Feb 2012 13:53:34 +0000</created>
                <updated>Mon, 20 Feb 2012 09:34:56 +0000</updated>
                    <resolved>Mon, 20 Feb 2012 09:34:41 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17450" author="beberlei" created="Mon, 20 Feb 2012 09:34:41 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                    <comment id="17451" author="beberlei" created="Mon, 20 Feb 2012 09:34:56 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/a32948b20fd3f67bd29e9dec5f637a46edfffff6&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/a32948b20fd3f67bd29e9dec5f637a46edfffff6&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1658] EntityGenerator allows to null ids associations.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1658</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/287/commits&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/287/commits&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13461">DDC-1658</key>
            <summary>EntityGenerator allows to null ids associations.</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 19 Feb 2012 23:33:27 +0000</created>
                <updated>Mon, 20 Feb 2012 08:46:15 +0000</updated>
                    <resolved>Mon, 20 Feb 2012 08:46:15 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1659] Clear read only entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1659</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/286&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/286&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13462">DDC-1659</key>
            <summary>Clear read only entities</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 19 Feb 2012 23:34:27 +0000</created>
                <updated>Mon, 20 Feb 2012 08:43:20 +0000</updated>
                    <resolved>Mon, 20 Feb 2012 08:43:20 +0000</resolved>
                                            <fixVersion>2.1.7</fixVersion>
                <fixVersion>2.2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17447" author="beberlei" created="Mon, 20 Feb 2012 08:43:20 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1651] APC query caching fails when an entity is bound to a query parameter.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1651</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When an entity is bound as a query parameter, query caching with APC fails with error message:&lt;/p&gt;

&lt;p&gt;Catchable fatal error: Object of class XXX could not be converted to string in /libs/doctrine-orm/Doctrine/DBAL/Connection.php on line 1081&lt;/p&gt;

&lt;p&gt;If I bind with entity&apos;s primary key field, everything works fine.&lt;/p&gt;</description>
                <environment>Debian, Php 5.3, APC 3.1.9</environment>
            <key id="13449">DDC-1651</key>
            <summary>APC query caching fails when an entity is bound to a query parameter.</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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jonathanpete">Jonathan Robinson</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 Feb 2012 00:26:30 +0000</created>
                <updated>Sat, 18 Feb 2012 15:13:11 +0000</updated>
                    <resolved>Sat, 18 Feb 2012 15:13:11 +0000</resolved>
                            <version>2.1.6</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17443" author="beberlei" created="Sat, 18 Feb 2012 15:13:11 +0000"  >&lt;p&gt;Fixed and merged into 2.2 branch.&lt;/p&gt;

&lt;p&gt;A rebase onto the 2.1.x branch would take a rewrite, since the code is completly new and since there is a simple workaround ($entity-&amp;gt;getId()) when binding i will not backported it into the 2.1.x branch.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/6cd82d77f5e581b3d21c60c5cb5e6c5042a3ff9b&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/6cd82d77f5e581b3d21c60c5cb5e6c5042a3ff9b&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1643] PersistentCollection should support clone</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1643</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m trying to clone a &lt;tt&gt;PersistentCollection&lt;/tt&gt; and expect to get a stable snapshot. But the class does not implement &lt;tt&gt;__clone&lt;/tt&gt;, thus both objects refer to the same internal &lt;tt&gt;ArrayCollection&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;I can&apos;t use &lt;tt&gt;takeSnapshot&lt;/tt&gt; because I&apos;m writing generic code that should work with any implementation of &lt;tt&gt;Traversable&lt;/tt&gt;/&lt;tt&gt;ArrayAccess&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13429">DDC-1643</key>
            <summary>PersistentCollection should support clone</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="bschussek">Bernhard Schussek</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Feb 2012 12:56:43 +0000</created>
                <updated>Fri, 17 Feb 2012 23:49:12 +0000</updated>
                    <resolved>Fri, 17 Feb 2012 23:49:12 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.1.7</fixVersion>
                <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17389" author="beberlei" created="Thu, 9 Feb 2012 18:38:28 +0000"  >&lt;p&gt;Moved to right project&lt;/p&gt;</comment>
                    <comment id="17391" author="bschussek" created="Fri, 10 Feb 2012 13:47:24 +0000"  >&lt;p&gt;Thank you for moving. Any comments on the feasibility of this issue?&lt;/p&gt;</comment>
                    <comment id="17392" author="beberlei" created="Fri, 10 Feb 2012 13:48:53 +0000"  >&lt;p&gt;I guess its feasible, i have to think about:&lt;/p&gt;

&lt;p&gt;1. how to fix the issue&lt;br/&gt;
2. what behavior to attach in general.&lt;/p&gt;</comment>
                    <comment id="17393" author="bschussek" created="Fri, 10 Feb 2012 13:50:42 +0000"  >&lt;p&gt;Ok. For the sake of completeness, this issue directly causes another in Symfony2 which was already partially fixed here: &lt;a href=&quot;https://github.com/symfony/symfony/pull/3315&quot; class=&quot;external-link&quot;&gt;https://github.com/symfony/symfony/pull/3315&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17422" author="auswebdev" created="Mon, 13 Feb 2012 21:13:32 +0000"  >&lt;p&gt;PR submitted for this issue: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/281&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/281&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17439" author="beberlei" created="Fri, 17 Feb 2012 22:41:22 +0000"  >&lt;p&gt;What are you doing after the PersistentCollection is cloned? &lt;/p&gt;

&lt;p&gt;The reason is, that if the code looks 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;$col = clone $entity-&amp;gt;getCol();
$otherEntity-&amp;gt;setCol($col);
echo count($col);
$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It will do very weird stuff using the owner of the association $col which is $entity. It will also try to insert the $col for $entity not for $otherEntity. To prevent this we have to do some work,&lt;/p&gt;</comment>
                    <comment id="17440" author="beberlei" created="Fri, 17 Feb 2012 23:49:12 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/93f79d0810a158138020b4cca3332f9f0b1a76af&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/93f79d0810a158138020b4cca3332f9f0b1a76af&lt;/a&gt; and merged into 2.2 and 2.1.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1640] Actual classMetadata is not used when entity with DiscriminatorMap is hydrated, instead AbstractClass metaData is used.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1640</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Because the className changes in ObjectHydrator:226 it might be that the ClassMetadata has not been loaded yet.&lt;br/&gt;
When the classMetadata has not been loaded the PostLoad events are not executed.&lt;/p&gt;

&lt;p&gt;adding the following after the className has changed solves the issue.&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;this&lt;/span&gt;-&amp;gt;_getClassMetadata($className);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;example: &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-object&quot;&gt;Class&lt;/span&gt; Session {
    /**
     * @access &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; ArrayCollection
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;AbstractService&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;session&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $services;
}
&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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @ORM\Entity
 * @ORM\HasLifecycleCallbacks
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;SINGLE_TABLE&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorMap({
 * 		&lt;span class=&quot;code-quote&quot;&gt;&quot;A&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;ServiceA&quot;&lt;/span&gt;,
 * 		&lt;span class=&quot;code-quote&quot;&gt;&quot;B&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;ServiceB&quot;&lt;/span&gt;
 * })
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class AbstractService 
{
    /**
     * @access &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     * @ORM\Column()
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_status;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $status;

    /**
     * @access &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;
     * @internal Do not use; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; is &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; Doctrine only
     * @ORM\PostLoad
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; void
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function _reconstituteValueObjects()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;status = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Status($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_status);
    }
}

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

&lt;p&gt;When I would do now:&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;foreach ( $session-&amp;gt;services as $service ) {
    $service-&amp;gt;status-&amp;gt;stop();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;$service would be a concrete class ServceA or ServiceB, but these ClassMetadata&apos;s might not be loaded yet. If this is the cause then $service-&amp;gt;status will be null as the @PostLoad has not been executed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13425">DDC-1640</key>
            <summary>Actual classMetadata is not used when entity with DiscriminatorMap is hydrated, instead AbstractClass metaData is used.</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jelte@marlon">Jelte Steijaert</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Feb 2012 13:20:50 +0000</created>
                <updated>Fri, 17 Feb 2012 22:29:34 +0000</updated>
                    <resolved>Fri, 17 Feb 2012 22:29:34 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17385" author="jelte@marlon" created="Thu, 9 Feb 2012 13:11:18 +0000"  >&lt;p&gt;I&apos;ve have found the same issue with the SimpleObjectHydrator.&lt;/p&gt;

&lt;p&gt;Although here it might have worse consequences.&lt;br/&gt;
When a row is hydrated it the class has a discriminatorMap, the classMetadata of the defined class (usually the abstract class) is used and not the actual classMetadata of the class it will be converted to.&lt;br/&gt;
Same issue here that the @PostLoad isn&apos;t triggered but also &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;this&lt;/span&gt;-&amp;gt;registerManaged($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;class,...) 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;uses the wrong classMetadata is used.&lt;/p&gt;

&lt;p&gt;should be: Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator:86&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;protected&lt;/span&gt; function hydrateRowData(array $sqlResult, array &amp;amp;$cache, array &amp;amp;$result)
    {
        $classMetadata = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;class;
        $entityName = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;class-&amp;gt;name;
        $data       = array();

        &lt;span class=&quot;code-comment&quot;&gt;// We need to find the correct entity class name &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; we have inheritance in resultset
&lt;/span&gt;        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($classMetadata-&amp;gt;inheritanceType !== ClassMetadata::INHERITANCE_TYPE_NONE) {
            $discrColumnName = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_platform-&amp;gt;getSQLResultCasing($classMetadata-&amp;gt;discriminatorColumn[&apos;name&apos;]);

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($sqlResult[$discrColumnName] === &apos;&apos;) {
                &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; HydrationException::emptyDiscriminatorValue(key($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_rsm-&amp;gt;aliasMap));
            }

            $entityName = $classMetadata-&amp;gt;discriminatorMap[$sqlResult[$discrColumnName]];
            $classMetadata = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getClassMetadata($entityName);

            unset($sqlResult[$discrColumnName]);
        }
        foreach ($sqlResult as $column =&amp;gt; $value) {
            &lt;span class=&quot;code-comment&quot;&gt;// Hydrate column information &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; not yet present
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! isset($cache[$column])) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (($info = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hydrateColumnInfo($entityName, $column)) === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
                    &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
                }

                $cache[$column] = $info;
            }

            &lt;span class=&quot;code-comment&quot;&gt;// Convert field to a valid PHP value
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($cache[$column][&apos;field&apos;])) {
                $type  = Type::getType($cache[$column][&apos;class&apos;]-&amp;gt;fieldMappings[$cache[$column][&apos;name&apos;]][&apos;type&apos;]);
                $value = $type-&amp;gt;convertToPHPValue($value, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_platform);
            }

            &lt;span class=&quot;code-comment&quot;&gt;// Prevent overwrite in &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; of inherit classes using same property name (See AbstractHydrator)
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($cache[$column]) &amp;amp;&amp;amp; ( ! isset($data[$cache[$column][&apos;name&apos;]]) || $value !== &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)) {
                $data[$cache[$column][&apos;name&apos;]] = $value;
            }
        }

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_hints[Query::HINT_REFRESH_ENTITY])) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;registerManaged($classMetadata, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_hints[Query::HINT_REFRESH_ENTITY], $data);
        }

        $uow    = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getUnitOfWork();
        $entity = $uow-&amp;gt;createEntity($entityName, $data, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_hints);

        &lt;span class=&quot;code-comment&quot;&gt;//TODO: These should be invoked later, after hydration, because associations may not yet be loaded here.
&lt;/span&gt;        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($classMetadata-&amp;gt;lifecycleCallbacks[Events::postLoad])) {
            $classMetadata-&amp;gt;invokeLifecycleCallbacks(Events::postLoad, $entity);
        }

        $evm = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getEventManager();

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($evm-&amp;gt;hasListeners(Events::postLoad)) {
            $evm-&amp;gt;dispatchEvent(Events::postLoad, &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; LifecycleEventArgs($entity, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em));
        }

        $result[] = $entity;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="17386" author="jelte@marlon" created="Thu, 9 Feb 2012 13:14:12 +0000"  >&lt;p&gt;Changed summery to better reflect the bug.&lt;/p&gt;</comment>
                    <comment id="17436" author="beberlei" created="Fri, 17 Feb 2012 22:29:34 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1556] @PostLoad hook being executed more than once for the same entity when loaded through relationship</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1556</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Scenario:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Entity mapping: &lt;tt&gt;A manytomany B&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Hooks: a &lt;tt&gt;@PostLoad&lt;/tt&gt; hook on B&lt;/li&gt;
	&lt;li&gt;Persisted entities: two instances of A related to the same instance of B&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When I load both A&apos;s using the EntityManager, and access the instance of B (internally from each A), the &lt;tt&gt;@PostLoad&lt;/tt&gt; hook is being triggered twice instead of once (as there is only one instance of A).&lt;/p&gt;

&lt;p&gt;I left an attachment with the code ready to run (please read the README.md to setup the environment).&lt;/p&gt;</description>
                <environment>Linux</environment>
            <key id="13294">DDC-1556</key>
            <summary>@PostLoad hook being executed more than once for the same entity when loaded through relationship</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="agvstin">Agust&#237;n Guti&#233;rrez</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2011 22:10:10 +0000</created>
                <updated>Fri, 17 Feb 2012 22:29:19 +0000</updated>
                    <resolved>Fri, 17 Feb 2012 22:29:19 +0000</resolved>
                                            <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17435" author="beberlei" created="Fri, 17 Feb 2012 22:29:19 +0000"  >&lt;p&gt;Fixed for 2.2.1&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11135" name="doctrine-postload-test.tgz" size="79865" author="agvstin" created="Thu, 22 Dec 2011 22:10:10 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1625] proxy initialized when accessing identifier on extending class</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1625</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The proxy is always initialized when the entity is extending another class and that parent class has get&amp;lt;IDENTIFIER&amp;gt; method&lt;/p&gt;</description>
                <environment></environment>
            <key id="13398">DDC-1625</key>
            <summary>proxy initialized when accessing identifier on extending class</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mvrhov">Miha Vrhovnik</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 Jan 2012 10:41:43 +0000</created>
                <updated>Sun, 5 Feb 2012 10:46:05 +0000</updated>
                    <resolved>Sun, 5 Feb 2012 10:46:05 +0000</resolved>
                            <version>2.2</version>
                <version>Git Master</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17353" author="mvrhov" created="Mon, 30 Jan 2012 11:16:06 +0000"  >&lt;p&gt;Fix: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/274&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/274&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17355" author="asm89" created="Mon, 30 Jan 2012 15:54:28 +0000"  >&lt;p&gt;Re-opening this ticket as a reminder for Benjamin to backport the fix to 2.2.&lt;/p&gt;</comment>
                    <comment id="17371" author="beberlei" created="Sun, 5 Feb 2012 10:46:05 +0000"  >&lt;p&gt;Merged into 2.2, See &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1634&quot; title=&quot;Lazy Proxy ID Method on Inheritance Entities not working&quot;&gt;&lt;del&gt;DDC-1634&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1634] Lazy Proxy ID Method on Inheritance Entities not working</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1634</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13412">DDC-1634</key>
            <summary>Lazy Proxy ID Method on Inheritance Entities not working</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 5 Feb 2012 10:13:46 +0000</created>
                <updated>Sun, 5 Feb 2012 10:15:50 +0000</updated>
                    <resolved>Sun, 5 Feb 2012 10:15:50 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17369" author="beberlei" created="Sun, 5 Feb 2012 10:13:55 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/274&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/274&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17370" author="beberlei" created="Sun, 5 Feb 2012 10:15:50 +0000"  >&lt;p&gt;Merged back from master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>