<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 05:06:23 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=labels+%3D+Mapping&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=labels+%3D+Mapping</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="3" total="3"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2383] Foreign relations on primary keys don&apos;t work on more than two entities (like Foo&lt;&gt;Bar&lt;&gt;Baz)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2383</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m trying to accomplish something like this:&lt;br/&gt;
&lt;a href=&quot;http://docs.doctrine-project.org/en/latest/tutorials/composite-primary-keys.html#use-case-2-simple-derived-identity&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/latest/tutorials/composite-primary-keys.html#use-case-2-simple-derived-identity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For two entities (Foo&amp;lt;&amp;gt;Bar) it works as expected but adding another entity related to Bar (so it&apos;s Foo&amp;lt;&amp;gt;Bar&amp;lt;&amp;gt;Baz) ends up with this error:&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;
Fatal error: Uncaught exception &apos;Doctrine\ORM\Mapping\MappingException&apos; with message &apos;The column id must be mapped to a field in class Entity\Bar since it is referenced by a join column of another class.&apos; in C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\MappingException.php:203
Stack trace:
#0 C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php(734): Doctrine\ORM\Mapping\MappingException::joinColumnMustPointToMappedField(&apos;Entity\Bar&apos;, &apos;id&apos;)
#1 C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php(2509): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;loadOneToOneEntity(Array, &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Entity\Bar))
#2 C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php(245): Doctrine\ORM\UnitOfWork-&amp;gt;createEntity(&apos;Entity\Bar&apos;, Array, Array)
#3 C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php(424): Doctrine\ORM\Internal\Hydration\Ob in C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\MappingException.php on line 203
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This error appears when there are some records in the database and I want to query for example all Foos.&lt;/p&gt;

&lt;p&gt;My entites look like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-comment&quot;&gt;//Entity/Foo.php
&lt;/span&gt;
/** @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;foos&quot;&lt;/span&gt;) */
class Foo
{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) @GeneratedValue */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

    /** @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Bar&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;foo&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $bar;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getBar()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setBar($bar)
    {
        $bar-&amp;gt;setFoo($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar = $bar;
    }
}

&lt;span class=&quot;code-comment&quot;&gt;//Entity/Bar.php
&lt;/span&gt;
/** @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;bars&quot;&lt;/span&gt;) */
class Bar
{
    /** @Id @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Foo&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $foo;

    /** @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Baz&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $baz;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($foo)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;foo = $foo;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getFoo()-&amp;gt;getId();
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getFoo()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;foo;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setFoo($foo)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;foo = $foo;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getBaz()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;baz;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setBaz($baz)
    {
        $bar-&amp;gt;setBar($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;baz = $baz;
    }
}

&lt;span class=&quot;code-comment&quot;&gt;//Entity/Baz.php
&lt;/span&gt;
/** @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;bazes&quot;&lt;/span&gt;) */
class Baz
{
    /** @Id @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Bar&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;baz&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $bar;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($bar)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar = $bar;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getBar()-&amp;gt;getId();
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getBar()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setBar($bar)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar = $bar;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And fails on&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;
$fooRepository = $em-&amp;gt;getRepository(&apos;Entity\Foo&apos;);
$foos = $fooRepository-&amp;gt;findAll();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14748">DDC-2383</key>
            <summary>Foreign relations on primary keys don&apos;t work on more than two entities (like Foo&lt;&gt;Bar&lt;&gt;Baz)</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="7">Can&apos;t Fix</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="extreme">Jacek J&#281;drzejewski</reporter>
                        <labels>
                        <label>hydration</label>
                        <label>mapping</label>
                        <label>relations</label>
                    </labels>
                <created>Mon, 1 Apr 2013 20:01:54 +0000</created>
                <updated>Sun, 14 Apr 2013 10:05:59 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 10:05:59 +0000</resolved>
                            <version>2.3</version>
                <version>2.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19920" author="extreme" created="Mon, 1 Apr 2013 21:21:26 +0000"  >&lt;p&gt;Attaching a test case which results in two exceptions - while creating the schema and while fetching entities.&lt;/p&gt;</comment>
                    <comment id="19998" author="beberlei" created="Sun, 14 Apr 2013 10:05:59 +0000"  >&lt;p&gt;This is sadly a restriction of the foreign keys as primary key feature.&lt;/p&gt;

&lt;p&gt;Due to the architecture of shared nothing Metadata instances we cannot validate this at mapping compile time, only at runtime, thus leading to this error.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11520" name="DDC2383Test.php" size="2946" author="extreme" created="Mon, 1 Apr 2013 21:19:50 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2199] Yaml driver does not take into account field @Version attribute</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2199</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Even if field has version: true attribute, Yaml driver does not set class metadata isVersioned and versionField properties. As a result optimistic lock cannot be used.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14312">DDC-2199</key>
            <summary>Yaml driver does not take into account field @Version attribute</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ggalakhov">Georgy Galakhov</reporter>
                        <labels>
                        <label>mapping</label>
                        <label>yaml</label>
                    </labels>
                <created>Fri, 14 Dec 2012 17:30:57 +0000</created>
                <updated>Sun, 16 Dec 2012 12:01:03 +0000</updated>
                    <resolved>Sun, 16 Dec 2012 12:01:03 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.3.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19140" author="beberlei" created="Sun, 16 Dec 2012 12:01:03 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2189] Bidirectional one-to-many association with Class Table Inheritance do not work</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2189</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Bidirectional one-to-many association with Class Table Inheritance does not work. Example.&lt;/p&gt;

&lt;p&gt;Entity Box;&lt;br/&gt;
Entity Item;&lt;br/&gt;
Entity BoxItem extends Item;&lt;/p&gt;

&lt;p&gt;BoxItem  has ManyToOne to Box;&lt;br/&gt;
Box      has OneToMany to BoxItems; &lt;/p&gt;

&lt;p&gt;Validation Error:&lt;br/&gt;
Got an error: Entities\Box: &quot;The association Entities\Box#items refers to the owning side field Entities\BoxItem#box which does not exist.&quot;,&lt;/p&gt;</description>
                <environment>PHP 5.4.8 (cli) (built: Oct 18 2012 13:02:07) &lt;br/&gt;
Copyright (c) 1997-2012 The PHP Group&lt;br/&gt;
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies&lt;br/&gt;
&lt;br/&gt;
Fedora Linux 17&lt;br/&gt;
&lt;br/&gt;
mysql  Ver 14.14 Distrib 5.5.28, for Linux (x86_64) using readline 5.1</environment>
            <key id="14296">DDC-2189</key>
            <summary>Bidirectional one-to-many association with Class Table Inheritance do 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="syao.work">Ro</reporter>
                        <labels>
                        <label>Mapping</label>
                    </labels>
                <created>Thu, 6 Dec 2012 08:45:05 +0000</created>
                <updated>Mon, 24 Dec 2012 09:23:26 +0000</updated>
                    <resolved>Mon, 24 Dec 2012 09:23:26 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19108" author="ocramius" created="Thu, 6 Dec 2012 09:17:37 +0000"  >&lt;p&gt;Not a blocker&lt;/p&gt;</comment>
                    <comment id="19109" author="ocramius" created="Thu, 6 Dec 2012 14:18:32 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=syao.work&quot; class=&quot;user-hover&quot; rel=&quot;syao.work&quot;&gt;Ro&lt;/a&gt; this looks invalid to me. &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;
    /**
     * @MayToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Asmuo&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;items&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;box_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $box;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What&apos;s `Asmuo`?&lt;/p&gt;</comment>
                    <comment id="19110" author="syao.work" created="Thu, 6 Dec 2012 14:20:26 +0000"  >&lt;p&gt;Sorry, I did post wrong file BoxItem, my mistake, but the bug persists.&lt;/p&gt;</comment>
                    <comment id="19111" author="ocramius" created="Thu, 6 Dec 2012 14:33:41 +0000"  >&lt;p&gt;Just checked on my side with attached entities (changed some namespaces, see latest attached files) and everything&apos;s fine.&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=syao.work&quot; class=&quot;user-hover&quot; rel=&quot;syao.work&quot;&gt;Ro&lt;/a&gt; you got a typo on one of your annotations, which is `MayToOne` and should be `ManyToOne`.&lt;/p&gt;</comment>
                    <comment id="19179" author="beberlei" created="Mon, 24 Dec 2012 09:23:26 +0000"  >&lt;p&gt;Error caused by Invalid mapping&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11360" name="Box.php" size="587" author="ocramius" created="Thu, 6 Dec 2012 14:33:41 +0000" />
                    <attachment id="11355" name="Box.php" size="600" author="syao.work" created="Thu, 6 Dec 2012 08:45:05 +0000" />
                    <attachment id="11361" name="BoxItem.php" size="372" author="ocramius" created="Thu, 6 Dec 2012 14:33:41 +0000" />
                    <attachment id="11359" name="BoxItem.php" size="514" author="syao.work" created="Thu, 6 Dec 2012 14:18:14 +0000" />
                    <attachment id="11362" name="Item.php" size="522" author="ocramius" created="Thu, 6 Dec 2012 14:33:41 +0000" />
                    <attachment id="11357" name="Item.php" size="572" author="syao.work" created="Thu, 6 Dec 2012 08:45:05 +0000" />
                    <attachment id="11358" name="testing_box.sql" size="1580" author="syao.work" created="Thu, 6 Dec 2012 08:45:05 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>