<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Fri May 24 01:58:15 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+10032+AND+labels+%3D+HasLifecycleCallbacks&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+10032+AND+labels+%3D+HasLifecycleCallbacks</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="1" total="1"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2157] @HasLifecycleCallbacks does not fire events when set on @MappedSuperclass</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2157</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am unable to fire any of the &quot;HasLifecycleCallbacks&quot; when defined on a MappedSuperclass... (neither PreUpdate, PostUpdate,PrePersist, PostPersist and others)&lt;/p&gt;

&lt;p&gt;I have even tried to put @ORM\HasLifecycleCallbacks on the child class with onPostRemove() on mapped =&amp;gt; not working anymore&lt;/p&gt;

&lt;p&gt;It only works when i put @ORM\HasLifecycleCallbacks and onPostRemove() both in child class &quot;MyMappedTask&quot;...&lt;/p&gt;

&lt;p&gt;Is this a bug ..?&lt;/p&gt;

&lt;p&gt;To reproduce :&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;
&amp;lt;?php
namespace MyProject\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\MappedSuperclass
 * @ORM\HasLifecycleCallbacks
 */
class MyMappedTask
{
   /**
    * @ORM\PreRemove
    * @ORM\PostRemove
    * @ORM\PreUpdate
    * @ORM\PostUpdate
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function onPostRemove()
    {
        echo &lt;span class=&quot;code-quote&quot;&gt;&quot;here is never reached !&quot;&lt;/span&gt;;
    }
}

/**
 * @ORM\Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;MyProject\Repository\MyTaskRepository&quot;&lt;/span&gt;)
 * @ORM\Table()
 */
class MyTask &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; MyMappedTask
{

}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Windows 7 x64 / Apache 2.4.2 / MySQL server 5.1.62</environment>
            <key id="14246">DDC-2157</key>
            <summary>@HasLifecycleCallbacks does not fire events when set on @MappedSuperclass</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="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="frederes">Frederic</reporter>
                        <labels>
                        <label>HasLifecycleCallbacks</label>
                        <label>MappedSuperclass</label>
                    </labels>
                <created>Tue, 20 Nov 2012 13:59:52 +0000</created>
                <updated>Tue, 27 Nov 2012 21:29:48 +0000</updated>
                    <resolved>Tue, 27 Nov 2012 21:29:48 +0000</resolved>
                            <version>2.2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19025" author="fabio.bat.silva" created="Thu, 22 Nov 2012 14:40:48 +0000"  >&lt;p&gt;code format&lt;/p&gt;</comment>
                    <comment id="19026" author="fabio.bat.silva" created="Thu, 22 Nov 2012 14:43:33 +0000"  >&lt;p&gt;Hi Frederic,&lt;/p&gt;

&lt;p&gt;It failed for all events or just for @PostRemove ?&lt;/p&gt;

&lt;p&gt;Could you try to add a failing test case ?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19038" author="frederes" created="Fri, 23 Nov 2012 14:35:46 +0000"  >&lt;p&gt;Hi Fabio,&lt;/p&gt;

&lt;p&gt;1) Thank you for the &quot;code&quot; tag, i didn&apos;t know to do &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.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;2) Is fails with all the Annotations &quot;Pre/Post*&quot; ...&lt;/p&gt;

&lt;p&gt;Did you try this test case ?&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;</comment>
                    <comment id="19040" author="fabio.bat.silva" created="Fri, 23 Nov 2012 18:40:18 +0000"  >&lt;p&gt;Hi Frederic,&lt;/p&gt;

&lt;p&gt;Can&apos;t reproduce.. &lt;br/&gt;
Could you try to change the attached test case and make it fails ?&lt;/p&gt;


&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19068" author="frederes" created="Tue, 27 Nov 2012 15:44:53 +0000"  >&lt;p&gt;Hi Fabio,&lt;/p&gt;

&lt;p&gt;Thank you for the test case, it is OK !&lt;/p&gt;

&lt;p&gt;I found what the problem was :&lt;br/&gt;
I use Symfony2 and i have one bundle with the @MappedSuperclass entity and its callbacks (@HasLifecycleCallbacks), and another bundle with the child class (@Entity/@Table).&lt;br/&gt;
In that case, you must register the 2 bundles on the mappings (config.yml) otherwise it fails. &lt;br/&gt;
(I only registered the bundle which contains the child class but was not enough for Doctrine to understand...) &lt;/p&gt;

&lt;p&gt;I don&apos;t know if it is a bug on Symfony2, not well documented in this case...&lt;/p&gt;

&lt;p&gt;Thank you for all&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11354" name="DDC2157Test.php" size="3171" author="fabio.bat.silva" created="Fri, 23 Nov 2012 18:30:19 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>