<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Tue May 21 14:58:46 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+annotationdriver&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+annotationdriver</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="2" total="2"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2370] Subclass annotations not being read, unable to use OneToMany relation with single table inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2370</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Subclasses that override parent class properties and define relations will not work as expected, because AnnotationDriver/Reader will only use the parent class annotation (discarding whatever subclass defined). &lt;/p&gt;

&lt;p&gt;The following code will produce 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;
[Mapping]  FAIL - The entity-class &apos;Test\Office&apos; mapping is invalid:
* The mappings Test\Office#employees and Employee#office are incosistent with each other.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;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;
&amp;lt;?php
namespace Test;
 
use Doctrine\ORM\Mapping as ORM;
 
/**
 * @ORM\Entity
 */
class Office 
{
    /**
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Person&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;office&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Person[]|ArrayCollection
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $people;
 
    /**
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Employee&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;office&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Employee[]|ArrayCollection
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $employees;
 
}
 
/**
 * @ORM\Entity
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;SINGLE_TABLE&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;employee&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Employee&quot;&lt;/span&gt;})
 */
class Person
{
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Office&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;people&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Office
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $office;
}
 
/**
 * @ORM\Entity
 */
class Employee &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Person
{
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Office&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;employees&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Office
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $office;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>PHP 5.4.11</environment>
            <key id="14725">DDC-2370</key>
            <summary>Subclass annotations not being read, unable to use OneToMany relation with single table inheritance</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>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="thinkscape">Arthur Bodera</reporter>
                        <labels>
                        <label>annotationdriver</label>
                        <label>inheritance</label>
                        <label>orm</label>
                    </labels>
                <created>Tue, 26 Mar 2013 12:50:57 +0000</created>
                <updated>Wed, 1 May 2013 19:18:25 +0000</updated>
                    <resolved>Wed, 1 May 2013 17:21:04 +0000</resolved>
                            <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20164" author="beberlei" created="Wed, 1 May 2013 17:21:04 +0000"  >&lt;p&gt;Overwriting assocations in this way is not supported.&lt;/p&gt;</comment>
                    <comment id="20181" author="thinkscape" created="Wed, 1 May 2013 19:18:25 +0000"  >&lt;p&gt;Ok, I get that it&apos;s not supported right now, but why did you mark it as resolved?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DCOM-165] Entities seems not be recognized by AnnotationDriver</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-165</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;Problem:&lt;br/&gt;
--------&lt;br/&gt;
&quot;$em-&amp;gt;getMetadataFactory()-&amp;gt;getAllMetadata()&quot;&lt;br/&gt;
Will result in an empty array. The entitiy manager is correctly configured and the entities files are loaded (echo&apos;s in the files will be displayed).&lt;/p&gt;


&lt;p&gt;Debug steps:&lt;br/&gt;
------------&lt;br/&gt;
Looking in the code for the problem I created the following debug points first:&lt;/p&gt;

&lt;p&gt;file AnnotationDriver.php method getAllClassNames()&lt;br/&gt;
after the line: &quot;$includedFiles[] = $sourceFile;&quot;&lt;br/&gt;
add: &quot;echo $sourceFile . &apos; is loaded&apos; . PHP_EOL;&quot;&lt;/p&gt;

&lt;p&gt;file AnnotationDriver.php method getAllClassNames()&lt;br/&gt;
after the line: &quot;$sourceFile = $rc-&amp;gt;getFileName();&quot;&lt;br/&gt;
add: &quot;echo $className . &apos; is loaded from: &apos; . $sourceFile . &apos; in the includedFiles array? &apos; . (in_array($sourceFile, $includedFiles) ? &apos;YES&apos; : &apos;not found &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;&apos;) . PHP_EOL;&quot;&lt;/p&gt;


&lt;p&gt;the following output will be displayed:&lt;br/&gt;
...&lt;br/&gt;
f:\workspace\nl.markei.posto-2.3\lib\relaties\Contact.php is loaded&lt;br/&gt;
...&lt;br/&gt;
nl\markei\posto\relaties\Contact is loaded from: F:\workspace\nl.markei.posto-2.3\lib\relaties\Contact.php in the includedFiles array? not found &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;

&lt;p&gt;It seems that Doctrine includes the file from f: but ReflectionClass say it is loaded from F:. The in_array() will fail and Doctrine will not recognized the entity.&lt;/p&gt;

&lt;p&gt;But this is not the full problem. I created a new debug point:&lt;/p&gt;

&lt;p&gt;file AnnotationDriver.php method getAllClassNames()&lt;br/&gt;
after the line: &quot;foreach ($this-&amp;gt;_paths as $path) {&quot;&lt;br/&gt;
add: &quot;echo &apos;path: &apos; . $path . &apos; after realpath: &apos; . realpath($path) . PHP_EOL;&quot;&lt;/p&gt;

&lt;p&gt;This will result in the following output:&lt;br/&gt;
&quot;path: F:\domains\markei.nl\lib\nl.markei.posto\ after realpath: f:\workspace\nl.markei.posto-2.3\lib&quot;&lt;/p&gt;

&lt;p&gt;So the conversion of the F: to f: is done by realpath; its look like &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;

&lt;p&gt;A simple fix should be in AnnotationDriver.php / getAllClassNames()&lt;br/&gt;
replace: &quot;$sourceFile = $rc-&amp;gt;getFileName();&quot;&lt;br/&gt;
by: &quot;$sourceFile = realpath($rc-&amp;gt;getFileName());&quot;&lt;/p&gt;

&lt;p&gt;After I did that, the problem still exists. So I add to echo&apos;s (one with realpath and one without at the part of the code). And both echo&apos;s result in a path starting with &quot;F:&quot;.&lt;/p&gt;

&lt;p&gt;So my first reaction was freaky!&lt;/p&gt;

&lt;p&gt;After some frustrating hours I found the problem in the symlink I used.&lt;br/&gt;
&quot;F:\domains\markei.nl\lib\nl.markei.posto&quot; was a symlink to &quot;f:\workspace\nl.markei.posto-2.3\lib&quot; and realpath will not convert the driver char in the target of the symlink for some freaky reason. After changing the symlink target to &quot;F:\workspace....&quot; everything works fine.&lt;/p&gt;


&lt;p&gt;Summary:&lt;br/&gt;
--------&lt;br/&gt;
realpath results are not consistent on Windows. This will resulting in problems under Windows.&lt;/p&gt;


&lt;p&gt;Possible solutions:&lt;br/&gt;
-------------------&lt;br/&gt;
Saying &quot;this is a PHP bug&quot;.&lt;br/&gt;
It is possible that there are more case sensitive problems hidding here on Windows. Maybe it is better to use (for Windows only!) a case insensitive in_array-alternative in AnnotationDriver.php getAllClassNames() (or convert all paths for to lowercase for Windows)&lt;/p&gt;</description>
                <environment>Windows 7 Profesional, Enterprise and Windows Server 2003 and 2008; Common: 2.2.3 DBAL: 2.2.2 ORM: 2.2.3; PHP 5.4.5 and 5.3.5</environment>
            <key id="14007">DCOM-165</key>
            <summary>Entities seems not be recognized by AnnotationDriver</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="maartendekeizer">Maarten de Keizer</reporter>
                        <labels>
                        <label>annotationdriver</label>
                        <label>realpath</label>
                        <label>symlink</label>
                        <label>windows</label>
                    </labels>
                <created>Sun, 2 Sep 2012 20:07:14 +0000</created>
                <updated>Wed, 23 Jan 2013 23:07:12 +0000</updated>
                                    <version>2.2</version>
                <version>2.3</version>
                                                <component>Annotations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19394" author="ocramius" created="Wed, 23 Jan 2013 23:06:56 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=maartendekeizer&quot; class=&quot;user-hover&quot; rel=&quot;maartendekeizer&quot;&gt;Maarten de Keizer&lt;/a&gt; looks like the issue is still there in doctrine/annotations. Are you able to come up with a failing test case?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>