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

<item>
            <title>[DDC-785] Post-Post-Persist event</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-785</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;postPersist/postUpdate events are triggered in the middle of a unitOfWork, and querying the DB in such events causes infinite loops. Doctrine attempts to flush the entity manager before running any query, which triggers flushing of entities, and postPersist/postUpdate events are triggered again.&lt;/p&gt;

&lt;p&gt;I did not checked, but the flush() before each query may be a performance problem too, if doctrine has to determine what has changed, depending on the changetracking policy.&lt;/p&gt;

&lt;p&gt;Also, it would be great if postPersist / postUpdate events were triggered after all entities have been persisted. It looks like that entities are flushed by groups of same &apos;type&apos;, and that events for a type are triggered once all of the elements of that group have been flushed, potentially before entities of an other type have been flushed : postPersist / postUpdate events are triggered while some other entities are still not flushed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11874">DDC-785</key>
            <summary>Post-Post-Persist event</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="arnaud-lb">arnaud-lb</reporter>
                        <labels>
                    </labels>
                <created>Thu, 2 Sep 2010 16:08:16 +0000</created>
                <updated>Fri, 14 Jan 2011 03:11:48 +0000</updated>
                                    <version>2.0-BETA4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14250" author="beberlei" created="Fri, 3 Sep 2010 03:10:08 +0000"  >&lt;p&gt;That is documented and for perfomance reasons we cannot move the preUpdate/postUpdate/prePersist/postPersist events to other locations inside the UnitOfWork.&lt;/p&gt;

&lt;p&gt;There is an onFlush event that allows for more flexibility and is triggered before any update/insert/delete is done by the UnitOfWork.&lt;/p&gt;
</comment>
                    <comment id="14274" author="arnaud-lb" created="Sat, 4 Sep 2010 08:09:58 +0000"  >&lt;p&gt;Thanks.&lt;/p&gt;

&lt;p&gt;I understand that. Is there any chance of getting some onPostFlush or similar, which would be triggered like onFlush, but after all update/insert/delete ? Or just some post-something event which is allowed to issue db queries.&lt;/p&gt;</comment>
                    <comment id="14458" author="gediminasm" created="Fri, 24 Sep 2010 10:02:13 +0000"  >&lt;p&gt;onFlush you can store your entity for furher processing and on postPersist you can check if there are no more insertions and process the entity if it needs additional query&lt;br/&gt;
I have faced all these issues and you can check &lt;a href=&quot;http://github.com/l3pp4rd/DoctrineExtensions/tree/master/lib/DoctrineExtensions/Translatable/&quot; class=&quot;external-link&quot;&gt;http://github.com/l3pp4rd/DoctrineExtensions/tree/master/lib/DoctrineExtensions/Translatable/&lt;/a&gt;&lt;br/&gt;
for a solution to your problem&lt;/p&gt;</comment>
                    <comment id="15140" author="gediminasm" created="Fri, 14 Jan 2011 03:11:48 +0000"  >&lt;p&gt;I think this issue should be closed since the main reason of opening it was the possibility to execute additional queries when inserts were pending in unit of work. In current release it does not cause a flush during an additional query execution anymore.  &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>