<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu Jun 20 04:18:13 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/PHPCR-34/PHPCR-34.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>[PHPCR-34] replacing a document fails</title>
                <link>http://www.doctrine-project.org/jira/browse/PHPCR-34</link>
                <project id="10060" key="PHPCR">Doctrine PHPCR</project>
                        <description>&lt;p&gt;when we have a saved document and remove that, then add a document at the same path without a flush in between, we get an exception. the reason is that persist already adds the phpcr node, but scheduleRemove does not remove the phpcrnode right away.&lt;/p&gt;

&lt;p&gt;the fix looks like it should be:&lt;br/&gt;
UnitOfWork.php 504 remove phpcr node - 1022 do not remove here as it was removed before.&lt;/p&gt;

&lt;p&gt;but this leads to a problem that is either in jackalope or the phpcr-odm about /functional/user/phpcr:class being not found.&lt;/p&gt;


&lt;p&gt;1) Doctrine\Tests\ODM\PHPCR\Functional\BasicCrudTest::testRemoveAndInsert&lt;br/&gt;
PHPCR\ItemExistsException: This node already has a child named user.&lt;/p&gt;

&lt;p&gt;/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/vendor/jackalope/src/Jackalope/Node.php:303&lt;br/&gt;
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:763&lt;br/&gt;
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:404&lt;br/&gt;
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:386&lt;br/&gt;
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:312&lt;br/&gt;
/home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/tests/Doctrine/Tests/ODM/PHPCR/Functional/BasicCrudTest.php:152&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13183">PHPCR-34</key>
            <summary>replacing a document fails</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>
                                <assignee username="seldaek">Jordi Boggiano</assignee>
                                <reporter username="dbu">David Buchmann</reporter>
                        <labels>
                    </labels>
                <created>Sun, 13 Nov 2011 21:13:08 +0000</created>
                <updated>Wed, 22 Feb 2012 15:03:39 +0000</updated>
                    <resolved>Wed, 22 Feb 2012 15:03:39 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16850" author="lsmith" created="Thu, 17 Nov 2011 09:45:49 +0000"  >&lt;p&gt;imho this is now fixed. it will throw an \InvalidArgumentException that the document is detached. I have added relevant tests.&lt;/p&gt;

&lt;p&gt;i have also created a ticket to add something to the persistence interfaces to make it possible to ensure that a node is cleared back to defaults for all fields not being persisted: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DCOM-77&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DCOM-77&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17329" author="dbu" created="Mon, 23 Jan 2012 16:16:39 +0000"  >&lt;p&gt;i still have a problem with this. doing &lt;/p&gt;

&lt;p&gt;        if ($old_node = $this-&amp;gt;dm-&amp;gt;find(null, $path)) &lt;/p&gt;
{
            $this-&amp;gt;dm-&amp;gt;remove($old_node);
        }

&lt;p&gt;        $menuitem = new MultilangMenuItem();&lt;br/&gt;
        $menuitem-&amp;gt;setPath($path);&lt;br/&gt;
        $menuitem-&amp;gt;setName($name);&lt;br/&gt;
        $menuitem-&amp;gt;setLabel($label);&lt;/p&gt;

&lt;p&gt;        $this-&amp;gt;dm-&amp;gt;persist($menuitem);&lt;br/&gt;
        return $menuitem;&lt;/p&gt;

&lt;p&gt;leads to an exception. but imo i should be able to do this? what if i want to change the type of document at this location?&lt;/p&gt;

&lt;p&gt;InvalidArgumentException&lt;br/&gt;
  Detached document passed to persist().  &lt;/p&gt;



&lt;p&gt;Exception trace:&lt;br/&gt;
 () at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:444&lt;br/&gt;
 Doctrine\ODM\PHPCR\UnitOfWork-&amp;gt;doScheduleInsert() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:414&lt;br/&gt;
 Doctrine\ODM\PHPCR\UnitOfWork-&amp;gt;scheduleInsert() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:447&lt;br/&gt;
 Doctrine\ODM\PHPCR\DocumentManager-&amp;gt;persist() at /home/david/liip/symfony-cmf/cmf-sandbox/src/Sandbox/MainBundle/Resources/data/fixtures/030_LoadMenuData.php:90&lt;br/&gt;
 Symfony\Cmf\Bundle\MenuBundle\Resources\data\fixtures\LoadMenuData-&amp;gt;createMenuItem() at /home/david/liip/symfony-cmf/cmf-sandbox/src/Sandbox/MainBundle/Resources/data/fixtures/030_LoadMenuData.php:43&lt;br/&gt;
 Symfony\Cmf\Bundle\MenuBundle\Resources\data\fixtures\LoadMenuData-&amp;gt;load() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/doctrine-data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php:94&lt;br/&gt;
 Doctrine\Common\DataFixtures\Executor\AbstractExecutor-&amp;gt;load() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/doctrine-data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php:55&lt;br/&gt;
 Doctrine\Common\DataFixtures\Executor\PHPCRExecutor-&amp;gt;execute() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/bundles/Doctrine/Bundle/PHPCRBundle/Command/LoadFixtureCommand.php:86&lt;br/&gt;
 Doctrine\Bundle\PHPCRBundle\Command\LoadFixtureCommand-&amp;gt;execute() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:237&lt;br/&gt;
 Symfony\Component\Console\Command\Command-&amp;gt;run() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/src/Symfony/Component/Console/Application.php:193&lt;br/&gt;
 Symfony\Component\Console\Application-&amp;gt;doRun() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75&lt;br/&gt;
 Symfony\Bundle\FrameworkBundle\Console\Application-&amp;gt;doRun() at /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/src/Symfony/Component/Console/Application.php:106&lt;br/&gt;
 Symfony\Component\Console\Application-&amp;gt;run() at /home/david/liip/symfony-cmf/cmf-sandbox/app/console:16&lt;/p&gt;</comment>
                    <comment id="17363" author="lsmith" created="Thu, 2 Feb 2012 20:41:10 +0000"  >&lt;p&gt;I guess this is related to adding DocumentManager::merge()&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/PHPCR-13&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/PHPCR-13&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17482" author="lsmith" created="Wed, 22 Feb 2012 15:03:39 +0000"  >&lt;p&gt;duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/PHPCR-13&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/PHPCR-13&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>