<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 00:08:53 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+MODM+AND+status+%3D+Closed+ORDER+BY+priority+DESC&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+MODM+AND+status+%3D+Closed+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="15" total="15"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[MODM-70] Updates of documents after read</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-70</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;When I save a document and then read it again updated the document with the initial values.&lt;/p&gt;

&lt;p&gt;The following log output when saving Doctrine:&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;Array
(
    [storing] =&amp;gt; 1
    [file] =&amp;gt; /app/tests/cases/models/asset/test.swf
    [document] =&amp;gt; Array
        (
            [filename] =&amp;gt; a3f06b4b882ee28ee8d8c7a5e6ab67e6.swf
            [php] =&amp;gt; ass
        )

    [class] =&amp;gt; Documents\Assets\Asset
    [db] =&amp;gt; test
    [collection] =&amp;gt; assets_files
)

Array
(
    [batchInsert] =&amp;gt; 1
    [num] =&amp;gt; 1
    [data] =&amp;gt; Array
        (
            [00000000341a62a40000000001574585] =&amp;gt; Array
                (
                    [cS] =&amp;gt; 3
                    [rS] =&amp;gt; 3
                    [co] =&amp;gt; 0
                    [ca] =&amp;gt; 0
                    [lvl] =&amp;gt; 0
                    [nb] =&amp;gt; 0
                    [sex] =&amp;gt; 0
                    [na] =&amp;gt; Building01
                    [typ] =&amp;gt; building
                    [as] =&amp;gt; Array
                        (
                            [$ref] =&amp;gt; assets_files
                            [$id] =&amp;gt; MongoId &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;
                                (
                                )

                            [$db] =&amp;gt; test
                        )

                )

        )

    [class] =&amp;gt; Documents\Assets\MapAsset
    [db] =&amp;gt; test
    [collection] =&amp;gt; map_assets
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then read:&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;Array
(
    [findOne] =&amp;gt; 1
    [query] =&amp;gt; Array
        (
            [_id] =&amp;gt; MongoId &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;
                (
                )

        )

    [fields] =&amp;gt; Array
        (
        )

    [class] =&amp;gt; Documents\Assets\MapAsset
    [db] =&amp;gt; test
    [collection] =&amp;gt; map_assets
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then check for updates Document:&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;dm-&amp;gt;getUnitOfWork()-&amp;gt;computeChangeSets();
$update = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;getUnitOfWork()-&amp;gt;getDocumentPersister(&apos;Documents\Assets\MapAsset&apos;)-&amp;gt;prepareUpdateData($mapAsset);
print_r($update);

Array
(
    [$set] =&amp;gt; Array
        (
            [cS] =&amp;gt; 3
            [rS] =&amp;gt; 3
            [co] =&amp;gt; 0
            [ca] =&amp;gt; 0
            [lvl] =&amp;gt; 0
            [nb] =&amp;gt; 0
            [sex] =&amp;gt; 0
            [na] =&amp;gt; Building01
            [typ] =&amp;gt; building
            [as] =&amp;gt; Array
                (
                    [$ref] =&amp;gt; assets_files
                    [$id] =&amp;gt; MongoId &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;
                        (
                        )

                    [$db] =&amp;gt; test
                )

        )

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

&lt;p&gt;Why is there an update even though it set the initial values? In Mongo are the values set correctly!&lt;/p&gt;

&lt;p&gt;Then I run a flush:&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;Array
(
    [update] =&amp;gt; 1
    [criteria] =&amp;gt; Array
        (
            [_id] =&amp;gt; MongoId &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;
                (
                )

        )

    [newObj] =&amp;gt; Array
        (
            [$set] =&amp;gt; Array
                (
                    [uploadDate] =&amp;gt; 0.63800000 1283421657
                    [length] =&amp;gt; 4222
                    [chunkSize] =&amp;gt; 262144
                    [md5] =&amp;gt; 2af70cb102026bde0cf9f181780b642c
                )

        )

    [options] =&amp;gt; Array
        (
        )

    [class] =&amp;gt; Documents\Assets\Asset
    [db] =&amp;gt; test
    [collection] =&amp;gt; assets_files
)

Array
(
    [update] =&amp;gt; 1
    [criteria] =&amp;gt; Array
        (
            [_id] =&amp;gt; MongoId &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;
                (
                )

        )

    [newObj] =&amp;gt; Array
        (
            [$set] =&amp;gt; Array
                (
                    [cS] =&amp;gt; 3
                    [rS] =&amp;gt; 3
                    [co] =&amp;gt; 0
                    [ca] =&amp;gt; 0
                    [lvl] =&amp;gt; 0
                    [nb] =&amp;gt; 0
                    [sex] =&amp;gt; 0
                    [na] =&amp;gt; Building01
                    [typ] =&amp;gt; building
                    [as] =&amp;gt; Array
                        (
                            [$ref] =&amp;gt; assets_files
                            [$id] =&amp;gt; MongoId &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;
                                (
                                )

                            [$db] =&amp;gt; test
                        )

                )

        )

    [options] =&amp;gt; Array
        (
        )

    [class] =&amp;gt; Documents\Assets\MapAsset
    [db] =&amp;gt; test
    [collection] =&amp;gt; map_assets
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;1st Doctrine update GridFS file and destroyed it! Wrong value for uploadDate and the file can then be displayed in the browser no longer!&lt;/p&gt;

&lt;p&gt;2nd Why did he updatet The Document with the same values that are already there in Mongo and the initial values are?&lt;/p&gt;

&lt;p&gt;Here is my test code:&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;$asset = APP_TEST_CASES . DS . &apos;models&apos; . DS . &apos;asset&apos; . DS . &apos;test.swf&apos;;
$assetInfo = pathinfo($asset);
$assetName =  md5($assetInfo[&apos;basename&apos;] . time() . mt_rand()) . &apos;.&apos; . $assetInfo[&apos;extension&apos;];
$assetFile = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Documents\Assets\Asset($asset, $assetName);

$cSpan = 3;
$rSpan = 3;
$mapAsset = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Documents\Assets\MapAsset(&apos;Building01&apos;, &apos;building&apos;, $cSpan, $rSpan, &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, $assetFile);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEqual($mapAsset-&amp;gt;getColumnSpan(), $cSpan);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEqual($mapAsset-&amp;gt;getRowSpan(), $rSpan);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEqual($mapAsset-&amp;gt;getSpans(), array(&apos;columnSpan&apos; =&amp;gt; $cSpan, &apos;rowSpan&apos; =&amp;gt; $rSpan));

$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;persist($mapAsset);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;flush();
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;refresh($mapAsset);

$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;getUnitOfWork()-&amp;gt;computeChangeSets();
$update = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;getUnitOfWork()-&amp;gt;getDocumentPersister(&apos;Documents\Assets\MapAsset&apos;)-&amp;gt;prepareUpdateData($mapAsset);
debug($update);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here is my test Documents:&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;namespace Documents\Assets;

/**
 * @Document(collection=&lt;span class=&quot;code-quote&quot;&gt;&quot;assets_files&quot;&lt;/span&gt;)
 */
class Asset {
	/**
	 * @Id
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_id;
	/**
	 * @File
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_file;
	/**
	 * @&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;filename&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_filename;
	/**
	 * @Field(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;uploadDate&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_uploadDate;
	/**
	 * @Field(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_length;
	/**
	 * @Field(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;chunkSize&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_chunkSize;
	/**
	 * @Field(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;md5&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_md5;
	/**
	 * @Field(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;contentType&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_contentType;
	/**
	 * @Field(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;metadata&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_metadata;

	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($file, $filename = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_file = $file;
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_filename = $filename;
	}
	
	&lt;span class=&quot;code-comment&quot;&gt;// ..
&lt;/span&gt;}

namespace Documents\Assets;

/**
 * @Document(collection=&lt;span class=&quot;code-quote&quot;&gt;&quot;map_assets&quot;&lt;/span&gt;)
 */
class MapAsset {
	/**
	 * @Id
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_id;

	/**
	 * @ReferenceOne(
	 *	targetDocument=&lt;span class=&quot;code-quote&quot;&gt;&quot;Documents\Assets\Asset&quot;&lt;/span&gt;,
	 *	name=&lt;span class=&quot;code-quote&quot;&gt;&quot;as&quot;&lt;/span&gt;,
	 *	cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;}
	 *	)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Documents\Assets\Asset
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_asset;

	&lt;span class=&quot;code-comment&quot;&gt;// ..
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
</description>
                <environment>Mongodb 1.6 (64-bit + Google V8)</environment>
            <key id="11870">MODM-70</key>
            <summary>Updates of documents after read</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="avalanche123">Bulat Shakirzyanov</assignee>
                                <reporter username="tecbot">Thomas Adam</reporter>
                        <labels>
                    </labels>
                <created>Thu, 2 Sep 2010 06:21:33 +0000</created>
                <updated>Wed, 24 Nov 2010 14:48:43 +0000</updated>
                    <resolved>Wed, 24 Nov 2010 14:48:43 +0000</resolved>
                                            <fixVersion>1.0.0BETA2</fixVersion>
                                <component>Persister</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14232" author="tecbot" created="Thu, 2 Sep 2010 06:33:05 +0000"  >&lt;p&gt;I have just seen. The read out after each of the Documents with the same values updated!&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;$user = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;findOne(&apos;Documents\User&apos;, array(&apos;snu.id&apos; =&amp;gt; (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;) $snid)); &lt;span class=&quot;code-comment&quot;&gt;//, array(&apos;snu.friends&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;));
&lt;/span&gt;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;getUnitOfWork()-&amp;gt;computeChangeSets();
$update = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;getUnitOfWork()-&amp;gt;getDocumentPersister(&apos;Documents\User&apos;)-&amp;gt;prepareUpdateData($user);
print_r($update); die();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;print all values!!!!&lt;/p&gt;</comment>
                    <comment id="14243" author="jwage" created="Thu, 2 Sep 2010 15:03:44 +0000"  >&lt;p&gt;Hi, can you make a simplified phpunit test case?&lt;/p&gt;</comment>
                    <comment id="14245" author="tecbot" created="Thu, 2 Sep 2010 15:37:58 +0000"  >&lt;p&gt;I&apos;ve just seen the &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/MODM-66&quot; title=&quot;Bug when persisting referenced collection&quot;&gt;&lt;del&gt;MODM-66&lt;/del&gt;&lt;/a&gt; is exactly the same errors.&lt;br/&gt;
It is the initial value after a refresh or read at a subsequent flush again highlighted as an update and it is doubly in Mongo!&lt;/p&gt;

&lt;p&gt;I can not just create a test case.&lt;/p&gt;</comment>
                    <comment id="14246" author="jwage" created="Thu, 2 Sep 2010 15:52:41 +0000"  >&lt;p&gt;Thanks, I see it is the same issue in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/MODM-66&quot; title=&quot;Bug when persisting referenced collection&quot;&gt;&lt;del&gt;MODM-66&lt;/del&gt;&lt;/a&gt;. We&apos;ll have a look and see what is wrong. Thanks, Jon&lt;/p&gt;</comment>
                    <comment id="14292" author="tecbot" created="Mon, 6 Sep 2010 14:36:40 +0000"  >&lt;p&gt;Test Case Added&lt;/p&gt;</comment>
                    <comment id="14294" author="avalanche123" created="Mon, 6 Sep 2010 15:20:51 +0000"  >&lt;p&gt;should be fixed here &lt;a href=&quot;http://github.com/doctrine/mongodb-odm/tree/MODM-70&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/mongodb-odm/tree/MODM-70&lt;/a&gt;, Jon please review.&lt;br/&gt;
The issue was cause due to the fact, that after hydration in UnitOfWork::getOrCreateDocument() we used the resultset from mongo as originalDocumentData, which in case field names were different from document properties led to wrong changeset calculation&lt;/p&gt;</comment>
                    <comment id="14295" author="tecbot" created="Mon, 6 Sep 2010 15:34:53 +0000"  >&lt;p&gt;Fantastic! it works. Many many thanks &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;</comment>
                    <comment id="14301" author="sebastian.hoitz" created="Tue, 7 Sep 2010 08:34:15 +0000"  >&lt;p&gt;I can also say that it works. This should be resolved.&lt;/p&gt;</comment>
                    <comment id="14314" author="tecbot" created="Fri, 10 Sep 2010 01:37:35 +0000"  >&lt;p&gt;When it is added into the master branch?&lt;/p&gt;</comment>
                    <comment id="14826" author="jwage" created="Wed, 24 Nov 2010 14:48:43 +0000"  >&lt;p&gt;This is fixed now due to some other refactoring we did. Committed test here &lt;a href=&quot;https://github.com/doctrine/mongodb-odm/commit/bfe54c52ac242181392c6c8f9af04c9885b53db8&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/mongodb-odm/commit/bfe54c52ac242181392c6c8f9af04c9885b53db8&lt;/a&gt; and it is passing. Thanks!&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="11851">MODM-66</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="10777" name="MODM70Test.php" size="2189" author="tecbot" created="Mon, 6 Sep 2010 14:36:40 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-67] EmbeddedDocument - no LifecycleCallbacks</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-67</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;LifecycleCallbacks in EmbeddedDocument are not called&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;/**
 * @EmbeddedDocument
 * @HasLifecycleCallbacks
 */
class SocialNetworkUser {

	/**
	 * @Int(name=&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; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
	/**
	 * @&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;fN&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $firstName;
	/**
	 * @&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;lN&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $lastName;
	/**
	 * @NotSaved
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name;

        &lt;span class=&quot;code-comment&quot;&gt;// ....
&lt;/span&gt;
	/**
	 * @PostLoad
	 */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function postLoad() {
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;name = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;firstName . &apos; &apos; . $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;lastName;
	}
}

/**
 * @Document(collection=&lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;)
 */
class User {
	/**
	 * @Id
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
	/**
	 * @EmbedOne(
	 * 	discriminatorField=&lt;span class=&quot;code-quote&quot;&gt;&quot;php&quot;&lt;/span&gt;,
	 * 	discriminatorMap={
	 * 		&lt;span class=&quot;code-quote&quot;&gt;&quot;fbu&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;Documents\SocialNetworkUser &quot;&lt;/span&gt;
	 * 	},
	 * 	name=&lt;span class=&quot;code-quote&quot;&gt;&quot;snu&quot;&lt;/span&gt;,
	 * 	cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;}
	 * )
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $socialNetworkUser;
}

$_user = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;findOne(&apos;Documents\User&apos;, array(&apos;snu.id&apos; =&amp;gt; $uid));
print_r($_user-&amp;gt;getSocialNetworkUser()-&amp;gt;getName())
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;$name is empty.&lt;br/&gt;
postLoad is never called after load&lt;/p&gt;</description>
                <environment></environment>
            <key id="11852">MODM-67</key>
            <summary>EmbeddedDocument - no LifecycleCallbacks</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="tecbot">Thomas Adam</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Aug 2010 02:52:51 +0000</created>
                <updated>Tue, 31 Aug 2010 12:15:17 +0000</updated>
                    <resolved>Tue, 31 Aug 2010 02:58:18 +0000</resolved>
                                                            <component>Persister</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14187" author="tecbot" created="Tue, 31 Aug 2010 02:58:18 +0000"  >&lt;p&gt;Sorry, my mistake.&lt;br/&gt;
I have forgotten &quot;callbacks&quot; in cascade attribute &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.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;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-90] UnitOfWork incorrectly flushes certain documents with embedded documents on first flush</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-90</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;With documents that have embedded documents, the changeset is sometimes calculated incorrectly so that unmodified documents are flushed unnecessarily. This is similar in spirit to #&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/MODM-83&quot; title=&quot;UnitOfWork incorrectly updates all documents with embedded documents on flush&quot;&gt;&lt;del&gt;MODM-83&lt;/del&gt;&lt;/a&gt;, but this isn&apos;t covered by that fix.&lt;/p&gt;


&lt;p&gt;This can be seen when the document has an embedded document that uses a discriminator map. When calculating the changeset, the original value will have the discriminator field and value present while the actual value does not contain the discriminator field.&lt;/p&gt;

&lt;p&gt;Covering tests with fixes to follow shortly.&lt;/p&gt;</description>
                <environment>Ubuntu, PHP 5.3.2, Mongo 1.6.3</environment>
            <key id="12021">MODM-90</key>
            <summary>UnitOfWork incorrectly flushes certain documents with embedded documents on first flush</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="weaverryan">Ryan Weaver</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Oct 2010 08:01:40 +0000</created>
                <updated>Wed, 20 Oct 2010 12:52:06 +0000</updated>
                    <resolved>Wed, 20 Oct 2010 12:52:06 +0000</resolved>
                            <version>1.0.0BETA2</version>
                                <fixVersion>1.0.0BETA2</fixVersion>
                                <component>Hydration</component>
                <component>Persister</component>
                <component>UnitOfWork</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14584" author="weaverryan" created="Wed, 20 Oct 2010 08:42:18 +0000"  >&lt;p&gt;The covering test and fix can be found here: &lt;a href=&quot;http://github.com/weaverryan/mongodb-odm/tree/embedded_document_changeset_problem&quot; class=&quot;external-link&quot;&gt;http://github.com/weaverryan/mongodb-odm/tree/embedded_document_changeset_problem&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14587" author="avalanche123" created="Wed, 20 Oct 2010 12:52:06 +0000"  >&lt;p&gt;Fixed here - &lt;a href=&quot;http://github.com/doctrine/mongodb-odm/commit/01e02406f37a316399f4161d00b72efe43716173&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/mongodb-odm/commit/01e02406f37a316399f4161d00b72efe43716173&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-83] UnitOfWork incorrectly updates all documents with embedded documents on flush</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-83</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;UnitOfWork incorrectly contains every managed document with embedded documents. All embedded documents are marked as updated. The whole mess will be updated on the next flush, regardless of whether said documents have actually changed.&lt;/p&gt;

&lt;p&gt;Branch here: &lt;a href=&quot;http://github.com/opensky/mongodb-odm/tree/MODM-83&quot; class=&quot;external-link&quot;&gt;http://github.com/opensky/mongodb-odm/tree/MODM-83&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Test case here: &lt;a href=&quot;http://github.com/opensky/mongodb-odm/commit/af4373b58dd5da0bea5a0f8c4da30dde5ed1f266&quot; class=&quot;external-link&quot;&gt;http://github.com/opensky/mongodb-odm/commit/af4373b58dd5da0bea5a0f8c4da30dde5ed1f266&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here&apos;s what the document changeset looks like in preUpdate and postUpdate:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;preUpdate &quot;Doctrine\ODM\MongoDB\Tests\Functional\Ticket\MODM83OtherDocument&quot;&lt;/b&gt;&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;array(1) {
  [&quot;name&quot;]=&amp;gt;
  array(2) {
    [0]=&amp;gt;
    string(8) &quot;Neighbor&quot;
    [1]=&amp;gt;
    string(3) &quot;Bob&quot;
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;&lt;b&gt;postUpdate &quot;Doctrine\ODM\MongoDB\Tests\Functional\Ticket\MODM83OtherDocument&quot;&lt;/b&gt;&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;array(1) {
  [&quot;name&quot;]=&amp;gt;
  array(2) {
    [0]=&amp;gt;
    string(8) &quot;Neighbor&quot;
    [1]=&amp;gt;
    string(3) &quot;Bob&quot;
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;&lt;b&gt;preUpdate &quot;Doctrine\ODM\MongoDB\Tests\Functional\Ticket\MODM83TestDocument&quot;&lt;/b&gt;&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;array(1) {
  [&quot;embedded&quot;]=&amp;gt;
  array(2) {
    [0]=&amp;gt;
    array(1) {
      [&quot;name&quot;]=&amp;gt;
      string(5) &quot;Child&quot;
    }
    [1]=&amp;gt;
    array(2) {
      [&quot;name&quot;]=&amp;gt;
      string(5) &quot;Child&quot;
      [&quot;originalObject&quot;]=&amp;gt;
      object(Doctrine\ODM\MongoDB\Tests\Functional\Ticket\MODM83TestEmbeddedDocument)#86 (1) {
        [&quot;name&quot;]=&amp;gt;
        string(5) &quot;Child&quot;
      }
    }
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;&lt;b&gt;postUpdate &quot;Doctrine\ODM\MongoDB\Tests\Functional\Ticket\MODM83TestDocument&quot;&lt;/b&gt;&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;array(1) {
  [&quot;embedded&quot;]=&amp;gt;
  array(2) {
    [0]=&amp;gt;
    array(1) {
      [&quot;name&quot;]=&amp;gt;
      string(5) &quot;Child&quot;
    }
    [1]=&amp;gt;
    array(2) {
      [&quot;name&quot;]=&amp;gt;
      string(5) &quot;Child&quot;
      [&quot;originalObject&quot;]=&amp;gt;
      object(Doctrine\ODM\MongoDB\Tests\Functional\Ticket\MODM83TestEmbeddedDocument)#86 (1) {
        [&quot;name&quot;]=&amp;gt;
        string(5) &quot;Child&quot;
      }
    }
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>OS X 10.6.4, PHP 5.3.2, Mongo 1.6.3 (can reproduce on Ubuntu 8.04.4 LTS, CentOS, Win 7, etc)</environment>
            <key id="11970">MODM-83</key>
            <summary>UnitOfWork incorrectly updates all documents with embedded documents on flush</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>
                                <assignee username="avalanche123">Bulat Shakirzyanov</assignee>
                                <reporter username="bobthecow">Justin Hileman</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Sep 2010 16:11:23 +0000</created>
                <updated>Tue, 19 Oct 2010 07:01:29 +0000</updated>
                    <resolved>Mon, 4 Oct 2010 19:49:20 +0000</resolved>
                                                            <component>UnitOfWork</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14525" author="jwage" created="Mon, 4 Oct 2010 19:49:20 +0000"  >&lt;p&gt;Fixed here &lt;a href=&quot;http://github.com/doctrine/mongodb-odm/commit/8bd3aef4055cfded62687d5ad0e762e3f12a473d&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/mongodb-odm/commit/8bd3aef4055cfded62687d5ad0e762e3f12a473d&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14578" author="a.koss" created="Tue, 19 Oct 2010 04:39:09 +0000"  >&lt;p&gt;I use this update, now i cant delete childrens with a other embedded document:&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;The complete document&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-quote&quot;&gt;&quot;_id&quot;&lt;/span&gt; : ObjectId(&lt;span class=&quot;code-quote&quot;&gt;&quot;4caeea835634c915360a0000&quot;&lt;/span&gt;),
   &lt;span class=&quot;code-quote&quot;&gt;&quot;categories&quot;&lt;/span&gt; : {
     &lt;span class=&quot;code-quote&quot;&gt;&quot;0&quot;&lt;/span&gt; : {
       &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; : ObjectId(&lt;span class=&quot;code-quote&quot;&gt;&quot;4cbd55f55634c99177030000&quot;&lt;/span&gt;),
       &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;neue Kategorie&quot;&lt;/span&gt;,
       &lt;span class=&quot;code-quote&quot;&gt;&quot;questions&quot;&lt;/span&gt; : {
         &lt;span class=&quot;code-quote&quot;&gt;&quot;0&quot;&lt;/span&gt; : {
           &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; : ObjectId(&lt;span class=&quot;code-quote&quot;&gt;&quot;4cbd55f75634c99177040000&quot;&lt;/span&gt;),
           &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;neue Frage&quot;&lt;/span&gt;,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;relevance&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;multi&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;answertype&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;other&quot;&lt;/span&gt; : 0
        }
      }
    }
  },
   &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;pipapo!&quot;&lt;/span&gt;,
   &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;ich bin ein Katalog&quot;&lt;/span&gt;,
   &lt;span class=&quot;code-quote&quot;&gt;&quot;version&quot;&lt;/span&gt; : 1
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now i add a new answer too the question:&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;The question with the new answer&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-quote&quot;&gt;&quot;questions&quot;&lt;/span&gt; : {
         &lt;span class=&quot;code-quote&quot;&gt;&quot;0&quot;&lt;/span&gt; : {
           &lt;span class=&quot;code-quote&quot;&gt;&quot;answers&quot;&lt;/span&gt; : {
             &lt;span class=&quot;code-quote&quot;&gt;&quot;0&quot;&lt;/span&gt; : {
               &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; : ObjectId(&lt;span class=&quot;code-quote&quot;&gt;&quot;4cbd56b95634c99b5b090000&quot;&lt;/span&gt;),
               &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;neue Antwort&quot;&lt;/span&gt;
            }
          },
           &lt;span class=&quot;code-quote&quot;&gt;&quot;answertype&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; : ObjectId(&lt;span class=&quot;code-quote&quot;&gt;&quot;4cbd55f75634c99177040000&quot;&lt;/span&gt;),
           &lt;span class=&quot;code-quote&quot;&gt;&quot;multi&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;neue Frage&quot;&lt;/span&gt;,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;other&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;relevance&quot;&lt;/span&gt; : 0
        } 
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When i delete now the new answer i have a empty array and i cant delete the question from the categorie.&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;The unkillable question&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-quote&quot;&gt;&quot;questions&quot;&lt;/span&gt; : {
         &lt;span class=&quot;code-quote&quot;&gt;&quot;0&quot;&lt;/span&gt; : {
           &lt;span class=&quot;code-quote&quot;&gt;&quot;answers&quot;&lt;/span&gt; : [
            
          ],
           &lt;span class=&quot;code-quote&quot;&gt;&quot;answertype&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; : ObjectId(&lt;span class=&quot;code-quote&quot;&gt;&quot;4cbd55f75634c99177040000&quot;&lt;/span&gt;),
           &lt;span class=&quot;code-quote&quot;&gt;&quot;multi&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;neue Frage&quot;&lt;/span&gt;,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;other&quot;&lt;/span&gt; : 0,
           &lt;span class=&quot;code-quote&quot;&gt;&quot;relevance&quot;&lt;/span&gt; : 0
        }
      } 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Its a unkillable entry now.&lt;br/&gt;
Sorry for my bad english, i hope you can fix it, not my english, the bug. &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;</comment>
                    <comment id="14579" author="a.koss" created="Tue, 19 Oct 2010 07:01:29 +0000"  >&lt;p&gt;I have create a new issue: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/MODM-89&quot; class=&quot;external-link&quot;&gt;MODM-89&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-73] Neo4j (Graph oriented Database)</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-73</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;MongoDB Object Document Mapper is a particularly nice added value and represent a great interest for integrating into php framework.&lt;br/&gt;
MongoDB is one of the most representative actor in the document oriented databse and my suggestion here would be to implement&lt;br/&gt;
the same for the most representative graph oriented database which is Neo4J.&lt;/p&gt;

&lt;p&gt;Someone tried an overall PHP approach and his choice seems an interesting compromise =&amp;gt; &lt;a href=&quot;http://wiki.neo4j.org/content/PHP&quot; class=&quot;external-link&quot;&gt;http://wiki.neo4j.org/content/PHP&lt;/a&gt;.&lt;br/&gt;
A more elaborated approach around a doctrine work would be ore than helpful.&lt;/p&gt;</description>
                <environment>Multiplatform</environment>
            <key id="11890">MODM-73</key>
            <summary>Neo4j (Graph oriented Database)</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="kynao">Alexandre Emeriau</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Sep 2010 15:21:29 +0000</created>
                <updated>Wed, 24 Nov 2010 14:36:41 +0000</updated>
                    <resolved>Wed, 24 Nov 2010 14:36:41 +0000</resolved>
                                                            <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14296" author="jwage" created="Mon, 6 Sep 2010 17:22:01 +0000"  >&lt;p&gt;Hi, it sounds interesting! As of right now all the members of the Doctrine team are pretty busy with the existing projects and integrations. We would gladly consider accepting a contribution for another Doctrine library that follows the Doctrine2 style persistence layer. Maybe you and some others could work on something? or you could try and raise interest in it?&lt;/p&gt;</comment>
                    <comment id="14297" author="kynao" created="Mon, 6 Sep 2010 18:00:14 +0000"  >&lt;p&gt;Yes, that&apos;s absolutely the approach to follow as the doctrine team is busy. I will definitely try this once my skills will be enough in this area.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-120] [Configuration] problem with changing the defaultDB</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-120</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;What i want to do is to change the database name of the document manager:&lt;/p&gt;


&lt;p&gt;$config = new Configuration();&lt;br/&gt;
$dm  = new DocumentManager($conn, &apos;my_db&apos;, $config);&lt;/p&gt;

&lt;p&gt;$config-&amp;gt;setDefaultDB(&apos;another_db&apos;);&lt;br/&gt;
$dm-&amp;gt;getDatabase(); // &apos;my_db&apos; insteadof &apos;another_db&apos;&lt;/p&gt;


&lt;p&gt;Is there another solution to do this ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12390">MODM-120</key>
            <summary>[Configuration] problem with changing the defaultDB</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="gordonslondon">jules b</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Feb 2011 08:56:39 +0000</created>
                <updated>Wed, 16 Feb 2011 16:58:15 +0000</updated>
                    <resolved>Wed, 16 Feb 2011 16:58:15 +0000</resolved>
                            <version>1.0.0BETA1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15327" author="jwage" created="Wed, 16 Feb 2011 16:58:15 +0000"  >&lt;p&gt;Hi, i reverted the change that caused these problems so it should be all good now.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-109] Reference with Inheritance: Proxy error: &apos;document with identifier .. could not be found&apos;</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-109</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;It&apos;s hard to explain this issue,&lt;/p&gt;

&lt;p&gt;I have a single table Inheritance, the base class is Block. ContainerBlock is a child class of Block.&lt;br/&gt;
I have a document Page who have a one-one with ContainerBlock (child of Block). ContainerBlock as many Block.&lt;/p&gt;


&lt;ul&gt;
	&lt;li&gt;Test script:&lt;br/&gt;
----------------&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I have created a complete test-case (see attachment).&lt;br/&gt;
phpunit InheritanceReference/InheritanceReferenceTest.php&lt;/p&gt;


&lt;ul&gt;
	&lt;li&gt;Expected result:&lt;br/&gt;
-----------------------&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;no error, no exception.&lt;/p&gt;


&lt;ul&gt;
	&lt;li&gt;Actual result:&lt;br/&gt;
-------------------&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;1) InheritanceReference\InheritanceReferenceTest::testMulipleInheritance&lt;br/&gt;
Doctrine\ODM\MongoDB\MongoDBException: The &quot;Proxy\DocumentBlockProxy&quot; document with identifier &quot;4d3d08116aba269508000001&quot; could not be found.&lt;/p&gt;

&lt;p&gt;src/vendor/symfony/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/MongoDBException.php:69&lt;br/&gt;
src/Bundle/InheritanceReference/Proxy/DocumentBlockProxy.php:25&lt;br/&gt;
src/Bundle/InheritanceReference/Proxy/DocumentBlockProxy.php:34&lt;br/&gt;
src/Bundle/InheritanceReference/InheritanceReferenceTest.php:65&lt;/p&gt;</description>
                <environment>Mac osx</environment>
            <key id="12322">MODM-109</key>
            <summary>Reference with Inheritance: Proxy error: &apos;document with identifier .. could not be found&apos;</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="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="gordonslondon">jules b</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Jan 2011 00:19:11 +0000</created>
                <updated>Fri, 11 Feb 2011 15:26:37 +0000</updated>
                    <resolved>Fri, 11 Feb 2011 15:26:37 +0000</resolved>
                            <version>1.0.0BETA2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15267" author="jwage" created="Fri, 11 Feb 2011 15:26:37 +0000"  >&lt;p&gt;In your annotations you have @mongodb: but for just a standalone Doctrine test you don&apos;t need that. When I corrected the annotations no problem existed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10914" name="InheritanceReference.tgz" size="2850" author="gordonslondon" created="Mon, 24 Jan 2011 00:19:11 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-103] @File tag support in xml notation</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-103</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Please correct me if I&apos;m wrong but it looks like that @File tag (Mongo GridFS indicator) is not supported by xmlDriver.&lt;br/&gt;
I could not find anything about this feature neither in unitests for the system nor in documentation (as concerning the code probably I missed something but I also could not find anything related to GrisFS in xmlDriver code) .&lt;/p&gt;</description>
                <environment>CentOS 5.5, PHP 5.3.3</environment>
            <key id="12241">MODM-103</key>
            <summary>@File tag support in xml notation</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="vkaplich">Vitaliy Kaplich</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Dec 2010 09:56:58 +0000</created>
                <updated>Mon, 20 Dec 2010 16:08:30 +0000</updated>
                    <resolved>Mon, 20 Dec 2010 16:08:30 +0000</resolved>
                            <version>1.0.0BETA2</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14986" author="jwage" created="Mon, 20 Dec 2010 16:08:30 +0000"  >&lt;p&gt;You would just do 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;&amp;lt;field fieldName=&lt;span class=&quot;code-quote&quot;&gt;&quot;photo&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;file&quot;&lt;/span&gt; /&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-98] Partial UnitOfWork clear on runtime defaultDb change</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-98</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Actually I am not sure if this is a bug or just ODM limitation, but there is a use-case for MongoDb which doesn&apos;t fit well with current ODM implementation. &lt;/p&gt;

&lt;p&gt;Imagine SaaS service, where each client has his own DB. Documents and collections are all the same, except most of them are stored in different DBs, depending on context.&lt;/p&gt;

&lt;p&gt;It works pretty well with ODM defaultDB configration setting, until you need to process data from different dbs (e.g. iterate db by db in CLI script). When you try to change default db, repositories and persisters stay there and all keep a reference to initial DB. And they don&apos;t get reset on UnitOfWork-&amp;gt;clear(). It would be great to have runtime defaultDb switching out of the box, but if that is a problem, maybe you can advice on how this could be handled?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12203">MODM-98</key>
            <summary>Partial UnitOfWork clear on runtime defaultDb change</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="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="vladar">Vladimir Razuvaev</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Dec 2010 02:34:41 +0000</created>
                <updated>Mon, 20 Dec 2010 16:50:15 +0000</updated>
                    <resolved>Mon, 20 Dec 2010 16:50:15 +0000</resolved>
                            <version>1.0.0ALPHA2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14989" author="jwage" created="Mon, 20 Dec 2010 16:50:15 +0000"  >&lt;p&gt;Hi, this is actually by design. The configuration is not something you change at runtime. I think in your case you need to be working with multiple DocumentManager instances.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-96] YamlDriver Symfony Components Namespace Issue</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-96</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;In the YamlDriver.php the namespace is incorrect I pressume. It should be \Symfony\Components\Yaml\Yaml. Its missing a &apos;s&apos; in Component&lt;/p&gt;

&lt;p&gt;Current in Master :&lt;br/&gt;
protected function loadMappingFile($file)&lt;br/&gt;
{&lt;br/&gt;
        return \Symfony\Component\Yaml\Yaml::load($file);&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Desired Outcome&lt;br/&gt;
protected function loadMappingFile($file)&lt;br/&gt;
{&lt;br/&gt;
        return \Symfony\Components\Yaml\Yaml::load($file);&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>Ubunuto, Zend Server, MongoDB 1.6.3</environment>
            <key id="12165">MODM-96</key>
            <summary>YamlDriver Symfony Components Namespace Issue</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="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="nashad">Nashad Alam</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Nov 2010 23:40:11 +0000</created>
                <updated>Mon, 20 Dec 2010 16:51:29 +0000</updated>
                    <resolved>Mon, 20 Dec 2010 16:51:29 +0000</resolved>
                            <version>1.0.0BETA2</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14990" author="jwage" created="Mon, 20 Dec 2010 16:51:29 +0000"  >&lt;p&gt;Hi, no they renamed it to Component. No &quot;s&quot;. Do you have an old version of the YAML component maybe?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-95] Persisting a document that had embedded documents prior to being removed results in a document with no embedded documents</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-95</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;1) Persist a document with embedded documents&lt;br/&gt;
2) Load document into memory (store in variable)&lt;br/&gt;
3) Remove document using ODM&lt;br/&gt;
4) Persist loaded document back to DB using ODM&lt;br/&gt;
5) Embedded documents are now gone&lt;/p&gt;

&lt;p&gt;I have created a new failing test in the ODM and requested a pull&lt;/p&gt;</description>
                <environment></environment>
            <key id="12146">MODM-95</key>
            <summary>Persisting a document that had embedded documents prior to being removed results in a document with no embedded documents</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="jseverson">Jay Severson</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Nov 2010 06:29:05 +0000</created>
                <updated>Wed, 24 Nov 2010 13:02:52 +0000</updated>
                    <resolved>Wed, 24 Nov 2010 13:02:52 +0000</resolved>
                                            <fixVersion>1.0.0BETA2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14809" author="jwage" created="Wed, 24 Nov 2010 13:02:52 +0000"  >&lt;p&gt;Thanks! Fixed in master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-31] Cannot use a document against multiple classes</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-31</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;It would be useful to be able to use two classes on one document, in a way that transparently extends the original schema. My use case:&lt;/p&gt;

&lt;p&gt;I have a base Application that manages users of the system. A module/plugin to the system wants to extend the User records to include references to one of it&apos;s documents:&lt;/p&gt;

&lt;p&gt;namespace Application\Model;&lt;br/&gt;
class User {&lt;br/&gt;
//user properties here&lt;br/&gt;
}&lt;/p&gt;

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

&lt;p&gt;namespace Organisation\Model;&lt;br/&gt;
use Application\Model\User as BaseUser;&lt;/p&gt;

&lt;p&gt;class Organisation {&lt;br/&gt;
//organisations properties&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;class User extends BaseUser {&lt;br/&gt;
/** @ReferenceOne(targetDocument=&quot;\Organisation\Model\Organisation&quot;) */&lt;br/&gt;
protected $organisation&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;It this theoretical scenario, the original \Application\Model\User needs to be used by the base application, but the \Organisation\Model\User can be used by the addon module to transparently add more data to the same user. The base class doesn&apos;t need to know it will be used this way.&lt;/p&gt;

&lt;p&gt;Current behaviour for the above will ignore the additional properties not available in the parent class, and doesn&apos;t throw any exceptions/errors.&lt;/p&gt;

&lt;p&gt;Other ways to make it work involve the base class knowing it will be extended via SCI, or using a mappedsuperclass?, which isn&apos;t transparent in the base class, it needs to be altered to work with it&apos;s children.&lt;/p&gt;</description>
                <environment>Mac OS X 10.6.4, Built in PHP with extra modules: &lt;br/&gt;
zend_extension=xdebug.so&lt;br/&gt;
extension=mongo.so&lt;br/&gt;
extension=mssql.so&lt;br/&gt;
extension=xdiff.so&lt;br/&gt;
extension=pcntl.so&lt;br/&gt;
extension=imap.so&lt;br/&gt;
extension=mcrypt.so&lt;br/&gt;
&lt;br/&gt;
Doctrine Commond/DBAL/ODM from git</environment>
            <key id="11695">MODM-31</key>
            <summary>Cannot use a document against multiple classes</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="scottaubrey">Scott Aubrey</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Jul 2010 15:20:54 +0000</created>
                <updated>Fri, 30 Jul 2010 13:27:17 +0000</updated>
                    <resolved>Fri, 30 Jul 2010 13:27:17 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13730" author="jwage" created="Thu, 29 Jul 2010 15:31:43 +0000"  >&lt;p&gt;We have inheritance options that will allow that. Wouldn&apos;t this do the trick?&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;namespace Application\Model;

/** @MappedSuperclass(collection=&lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;) */
class BaseUser
{
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}

/** @Document */
class User &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; BaseUser
{
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}

namespace Organisation\Model;

use Application\Model\BaseUser;

/** @Document */
class User &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; BaseUser
{
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-20] SINGLE_COLLECTION inheritance does not work</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-20</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;It seems that SINGLE_COLLECTION inheritance is not implemented?&lt;/p&gt;

&lt;p&gt;Method UnitOfWork::getOrCreateDocument calls Mapping\Metadata::newInstance without taking possible discriminator map into account.&lt;/p&gt;

&lt;p&gt;The example in the official documentation (&lt;a href=&quot;http://www.doctrine-project.org/projects/mongodb_odm/1.0/docs/reference/inheritance-mapping/en&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/projects/mongodb_odm/1.0/docs/reference/inheritance-mapping/en&lt;/a&gt;) is not a real test: the object is first created as a child-class instance before being queried through the parent class, so the object is returned without hydration, from the UnitOfWork identityMap cache.&lt;/p&gt;

&lt;p&gt;The corresponding code from Doctrine\ORM is in Doctrine\ORM\Internal\Hydration\ObjectHydrator::_getEntity (find class name through discriminator map, if any).&lt;/p&gt;</description>
                <environment>PHP 5.3.1, Doctrine ODM MongoDB 2010-06-22 16:07:10</environment>
            <key id="11546">MODM-20</key>
            <summary>SINGLE_COLLECTION inheritance does not work</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="okapi">Okapi</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Jun 2010 10:01:42 +0000</created>
                <updated>Wed, 24 Nov 2010 13:10:19 +0000</updated>
                    <resolved>Wed, 24 Nov 2010 13:10:19 +0000</resolved>
                            <version>1.0.0ALPHA2</version>
                                <fixVersion>1.0.0BETA2</fixVersion>
                                <component>Hydration</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13521" author="jwage" created="Mon, 5 Jul 2010 12:27:33 +0000"  >&lt;p&gt;It is just not implemented/finished yet. I will fix the code you mention soon. Thanks, Jon&lt;/p&gt;</comment>
                    <comment id="14239" author="okapi" created="Thu, 2 Sep 2010 12:40:58 +0000"  >&lt;p&gt;Hi Jon,&lt;/p&gt;

&lt;p&gt;Indeed, hydration seems aware of the discriminator map now (I only use Single Collection inheritance).&lt;/p&gt;

&lt;p&gt;But the discriminator map seems ignored when a document is fetched through its ID (eg. DM::find($class, $id) ).&lt;/p&gt;

&lt;p&gt;Because of that, I just can&apos;t use this inheritance model. I can&apos;t see any possible workaround, since the discriminator field is no longer allowed to be declared in the class.&lt;/p&gt;


&lt;p&gt;Other point which is not a bug but a suggestion : instead of using a static discrminator map, couldn&apos;t we register an inflector class? Indeed, in most use cases, the document class name is the mere concatenation of the base class with a backslash followed by the camel-cased discriminator value.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Okapi&lt;/p&gt;</comment>
                    <comment id="14244" author="jwage" created="Thu, 2 Sep 2010 15:11:19 +0000"  >&lt;p&gt;Hi, the discriminator map should be used in both DocumentManager::find() and findOne()&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/MongoCollection.php#L285&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/MongoCollection.php#L285&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/MongoCollection.php#L315&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/MongoCollection.php#L315&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As far as the inflector class, we have to specify the full discriminator map on the parent class because otherwise we would have to load all the mapping information for all the subclasses to know the information.&lt;/p&gt;

&lt;p&gt;Can you give some kind of test code or a test case or something for your reason to re-open?&lt;/p&gt;</comment>
                    <comment id="14252" author="okapi" created="Fri, 3 Sep 2010 08:53:59 +0000"  >&lt;p&gt;Hi, indeed. I&apos;ve had difficulties in running the PHPUnit tests, but have struggled on the issue within my app long enough to have a clear scenario.&lt;/p&gt;

&lt;p&gt;Consider the following unit test:&lt;br/&gt;
Doctrine\ODM\MongoDB\Tests\Functional\InheritanceTest::testSingleCollectionInhertiance()&lt;/p&gt;

&lt;p&gt;Data has been inserted according to the code before $this-&amp;gt;dm-&amp;gt;clear();&lt;/p&gt;

&lt;p&gt;Now, in a new PHP instance (web req or CLI proc) (to avoid taking any risk related to the reliability of DocumentManager::clear() and make sure objects are freshly hydrated ),&lt;/p&gt;

&lt;p&gt;The follow assertion should be OK (I would expect it to be in the test, as it represents the purpose of the discriminator map):&lt;br/&gt;
        $document = $this-&amp;gt;dm-&amp;gt;findOne(&apos;Documents\Project&apos;, array(&apos;name&apos; =&amp;gt; &apos;Sub Project&apos;));&lt;br/&gt;
        $this-&amp;gt;assertInstanceOf(&apos;Documents\SubProject&apos;, $document);&lt;/p&gt;

&lt;p&gt;Now, suppose $id is the identifier value of $document as returned by the former code.&lt;br/&gt;
The following assertion should be also true:&lt;br/&gt;
        $document = $this-&amp;gt;dm-&amp;gt;find(&apos;Documents\Project&apos;, $id);&lt;br/&gt;
        $this-&amp;gt;assertInstanceOf(&apos;Documents\SubProject&apos;, $document);&lt;/p&gt;

&lt;p&gt;This former test would fail in my case (doc class is Documents\Project as queried).&lt;/p&gt;

&lt;p&gt;To me, the purpose of single inheritance is when we don&apos;t know by advance the class of the object that hydration will yield. The query is made on a common document class, and the class of each returned document will depend on the discriminator field.&lt;br/&gt;
In a typical application, these classes would implement a common interface. Having the possibility to isolate the implementation (concrete class) from the query is a key feature to benefit from the schema-less character of a NoSQL DB.&lt;/p&gt;

&lt;p&gt;Am I right, or missing something?&lt;/p&gt;
</comment>
                    <comment id="14260" author="jwage" created="Fri, 3 Sep 2010 12:22:13 +0000"  >&lt;p&gt;That is correct, this is how it is intended to work and as far as I&apos;ve tested it is working that way. I even added your code to the test and it passes: &lt;a href=&quot;http://github.com/doctrine/mongodb-odm/commit/54f68d9a4623ec7daa18bf5671ebba778bbc0df8&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/mongodb-odm/commit/54f68d9a4623ec7daa18bf5671ebba778bbc0df8&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14285" author="okapi" created="Mon, 6 Sep 2010 11:27:43 +0000"  >&lt;p&gt;Hello, after hours of seeking the cause why Doctrine tests pass and mines don&apos;t although very similar to each other!!&lt;/p&gt;

&lt;p&gt;Answer is: in my project, the base document class which declares the single inheritance behaviour does not include itself in the discriminator map.&lt;/p&gt;

&lt;p&gt;Indeed, in the unit tests, Documents\Project is used for both a collection (to query from) and an implementation (of documents with type &quot;project&quot;).&lt;/p&gt;

&lt;p&gt;In my project, the &quot;collection document class&quot; (setting up the inheritance) is abstract. For now, to please Doctrine ODM, I have included it in the discriminator map under the dumb key &quot;abstract&quot;. Doctrine seems fine with it, but there is a logical problem, in the sense that it may try innocently  to instanciate my abstract class if it fetches from MongoDB a document with the corresponding type.&lt;/p&gt;

&lt;p&gt;What do you think?&lt;/p&gt;

&lt;p&gt;Thinking of the case where a fetched document does not match an item in the discriminator map, does the hydrator fall back to the main document class?&lt;br/&gt;
Should we have an annotation like @DiscriminatorFallbackValue or @DiscriminatorFallbackDocument ?&lt;/p&gt;

&lt;p&gt;If I have suggestions / thinking about how inheritance can be better used, where do you want me to write them? Here or on the forum?&lt;/p&gt;</comment>
                    <comment id="14286" author="jwage" created="Mon, 6 Sep 2010 11:58:20 +0000"  >&lt;p&gt;Can you make a test then with how your entities are setup so I can work on a patch?&lt;/p&gt;</comment>
                    <comment id="14298" author="okapi" created="Tue, 7 Sep 2010 06:08:03 +0000"  >&lt;p&gt;Sorry, I don&apos;t have a Github account, and am leaving for a week-long trip, so I don&apos;t have th etime yet to make a proper contribution.&lt;/p&gt;

&lt;p&gt;However, I have modified tests&apos; Documents\Project, added Documents\OtherSubProject and updated Doctrine\ODM\MongoDB\Tests\Functional\InheritanceTest. Here is a tar.gz of these 3 files.&lt;/p&gt;

&lt;p&gt;The instanceOf assertions fails, as the hydrator always returns Documents\Project objects, whatever the &quot;type&quot; is.&lt;br/&gt;
Note that adding &quot;project&quot;=&quot;Documents\Project&quot; to the discriminator map makes the test pass again.&lt;/p&gt;</comment>
                    <comment id="14810" author="jwage" created="Wed, 24 Nov 2010 13:10:19 +0000"  >&lt;p&gt;I&apos;m pretty certain this is fixed now. I ran your test and it is passing now. I merged the changes and committed it.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10778" name="unit_test.tar.gz" size="1187" author="okapi" created="Tue, 7 Sep 2010 06:08:03 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-18] All Document object properties are persisted regardless of mapping instructions.</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-18</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>
&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;User Model&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;class Users_Model_User
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $id;
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $username;
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $password;
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $myRuntimeProperty = &apos;some value&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;Document Mapping (in YAML)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Users_Model_User:
db: my_db
collection: users
fields:
    id:
        fieldName: id
        id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
    username:
        fieldName: username
        type: string
    password:
        fieldName: password
        type: string
&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;My test code&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$user = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Users_Model_User;
$user-&amp;gt;username = &apos;hello&apos;;
$user-&amp;gt;password = &apos;world&apos;;
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;persist($user);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dm-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The result is &quot;myRuntimeProperty&quot; is saved to the db.&lt;br/&gt;
This causes problems for several properties such as &quot;_propertyChangedListeners&quot; which, once saved and later loaded back from the database, overrides the array of object listeners with a string of &quot;Array&quot;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;If this is not a bug:&lt;/b&gt;&lt;br/&gt;
I have search everywhere for an answer. All the docs, mailing list, irc, blogs. If this is not a bug the solution needs to be better documented.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Temporary fix:&lt;/b&gt;&lt;br/&gt;
Use Docblock Annotations, set the unwanted properties with @NotSaved&lt;br/&gt;
(Unless there is also a way to set NotSaved using YAML?)&lt;/p&gt;</description>
                <environment>ubuntu, php 5.3.2, odm 1.0.0ALPHA1</environment>
            <key id="11529">MODM-18</key>
            <summary>All Document object properties are persisted regardless of mapping instructions.</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="rabbit">Rabbit</reporter>
                        <labels>
                    </labels>
                <created>Sun, 20 Jun 2010 12:23:32 +0000</created>
                <updated>Tue, 13 Jul 2010 10:42:43 +0000</updated>
                    <resolved>Tue, 13 Jul 2010 10:42:43 +0000</resolved>
                            <version>1.0.0ALPHA1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13383" author="rabbit" created="Sun, 20 Jun 2010 20:27:59 +0000"  >&lt;p&gt;I see how I was mistaken on this issue.&lt;/p&gt;

&lt;p&gt;Conceptually, marking any property as &quot;transient&quot; therefore preventing the data from persisting makes sense. In practice, I wonder if it would be possible to set the default behavior to transient on all fields unless otherwise stated.&lt;/p&gt;</comment>
                    <comment id="13384" author="jwage" created="Mon, 21 Jun 2010 00:24:21 +0000"  >&lt;p&gt;Right now it cannot be customized. It always persist every property unless otherwise specified.&lt;/p&gt;</comment>
                    <comment id="13530" author="avalanche123" created="Tue, 6 Jul 2010 18:56:10 +0000"  >&lt;p&gt;this should be resolved in the current trunk&lt;/p&gt;</comment>
                    <comment id="13575" author="avalanche123" created="Tue, 13 Jul 2010 10:42:43 +0000"  >&lt;p&gt;all the magic was removed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-111] Trouble with MappedSuperclass/Single collection inheritance and commit 2e8071a4dc68b027f969</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-111</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I have the following classes :&lt;/p&gt;

&lt;p&gt;@MappedSuperClass&lt;br/&gt;
@InheritanceType(&quot;SINGLE_COLLECTION&quot;)&lt;br/&gt;
@DiscriminatorField(fieldName=&quot;_class&quot;)&lt;br/&gt;
@DiscriminatorMap(&lt;/p&gt;
{&quot;SuperClass&quot;=&quot;SuperClass&quot;, &quot;SubClass1&quot;=&quot;SubClass1&quot;, &quot;SubClass2&quot;=&quot;SubClass2&quot;}
&lt;p&gt;)&lt;br/&gt;
abstract class SuperClass {}&lt;/p&gt;

&lt;p&gt;@Document&lt;br/&gt;
class SubClass1 extends SuperClass {}&lt;/p&gt;

&lt;p&gt;@MappedSuperClass&lt;br/&gt;
abstract class SuperClass2 extends SuperClass {}&lt;/p&gt;

&lt;p&gt;@Document&lt;br/&gt;
abstract class SubClass2 extends SuperClass2 {}&lt;/p&gt;

&lt;p&gt;SubClass2 does not use the single collection.&lt;br/&gt;
SubClass1 and SubClass2 do not use the discriminator map.&lt;/p&gt;

&lt;p&gt;This broke after commit 2e8071a4dc68b027f969.&lt;/p&gt;

&lt;p&gt;Why can&apos;t we use MappedSuperclasses in an single collection inheritance strategy ?&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12333">MODM-111</key>
            <summary>Trouble with MappedSuperclass/Single collection inheritance and commit 2e8071a4dc68b027f969</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="jfbus">JF Bustarret</reporter>
                        <labels>
                    </labels>
                <created>Fri, 28 Jan 2011 10:10:04 +0000</created>
                <updated>Fri, 11 Feb 2011 14:55:30 +0000</updated>
                    <resolved>Fri, 11 Feb 2011 14:55:30 +0000</resolved>
                            <version>1.0.0BETA2</version>
                                <fixVersion>1.0.0BETA2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15197" author="jfbus" created="Mon, 31 Jan 2011 03:47:29 +0000"  >&lt;p&gt;Dropped MappedSuperClasses and switched to Document classes.&lt;/p&gt;

&lt;p&gt;I&apos;m not very happy to have abstract classes configured as Document, but it works.&lt;/p&gt;</comment>
                    <comment id="15264" author="jwage" created="Fri, 11 Feb 2011 14:53:13 +0000"  >&lt;p&gt;Hi, can you make a test case for this exposing the problem?&lt;/p&gt;</comment>
                    <comment id="15265" author="jwage" created="Fri, 11 Feb 2011 14:55:30 +0000"  >&lt;p&gt;Ok, a mapped super class is not the top of the inheritance hierarchy. The first class that extends the mapped super class is where you would define that inheritance information.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>