<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed May 22 21:32:00 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DDC-515/DDC-515.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DDC-515] CLI Task: validate-mapping</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-515</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There should be a CLI task &quot;validate-mapping&quot; or similar that reads in the metadata of all configured, mapped classes and processes them one-by-one, looking for errors in the mapping. For example, it is easy to detect that way when there is an association mapped with mappedBy but the other side does not have inversedBy specified (or there is not even another side...) . We can not make such strict validations during runtime for performance reasons, so a specific CLI task can be a great help during development for troubleshooting.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11212">DDC-515</key>
            <summary>CLI Task: validate-mapping</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="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="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 Apr 2010 08:48:35 +0000</created>
                <updated>Tue, 11 May 2010 17:19:19 +0000</updated>
                    <resolved>Tue, 11 May 2010 17:19:19 +0000</resolved>
                                            <fixVersion>2.0-BETA2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="12637" author="beberlei" created="Mon, 12 Apr 2010 09:02:14 +0000"  >&lt;p&gt;We also need this to check in development if the current database schema equals the current metadata mapping. Possibly extracting all the logic of this into a Service Object so that users can include this in Phing or similar build processes.&lt;/p&gt;</comment>
                    <comment id="12700" author="romanb" created="Fri, 16 Apr 2010 12:16:15 +0000"  >&lt;p&gt;I interpret that as you volunteering &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.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="12801" author="mjh_ca" created="Fri, 30 Apr 2010 17:09:10 +0000"  >&lt;p&gt;It would also be helpful if the task could look for lifecycle callback annotations in the methods and raise a warning if the class does not have a @HasLifeCycleCallbacks annotation.&lt;/p&gt;</comment>
                    <comment id="12819" author="beberlei" created="Sun, 2 May 2010 16:55:28 +0000"  >&lt;p&gt;Hm this last one is a bit complicated, one would need to check if the annotation driver is used, instantiate your own reader and check for this error.&lt;/p&gt;</comment>
                    <comment id="12828" author="romanb" created="Mon, 3 May 2010 11:06:51 +0000"  >&lt;p&gt;In the context of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-567&quot; title=&quot;Foreign Key to Unique Field Update Failure&quot;&gt;DDC-567&lt;/a&gt; it would also be nice to validate that all referenced column names are primary key columns.&lt;/p&gt;

&lt;p&gt;ps. If anyone is curious why referencedColumnName then not always automatically points to the primary key column of the other class, its just not doable in an efficient way I think. referencedColumnName defaults to the hardcoded &quot;id&quot; name, because each class metadata must be able to be loaded independently without loading others (inheritance being an exception). If we start &quot;guessing&quot; default values by looking at other classes, we quickly load the metadata for huge parts (or all) of the mapping of the domain model on each request. At least during development without a persistent cache this would be a major pain and slowdown.&lt;/p&gt;</comment>
                    <comment id="12829" author="beberlei" created="Mon, 3 May 2010 11:44:21 +0000"  >&lt;p&gt;@Roman - I just checked for &quot;referencedColumnName&quot; in the code, aswell as for their descendants during metadata ClassMetadata generation.&lt;/p&gt;

&lt;p&gt;It seems they are not used &quot;that&quot; much throughout the code, would a lookuup to the targetEntity work? We could get rid of this attribute then...&lt;/p&gt;</comment>
                    <comment id="12830" author="romanb" created="Mon, 3 May 2010 11:52:13 +0000"  >&lt;p&gt;@Benjamin: We can not get rid of it anyway because of composite keys I think.&lt;/p&gt;

&lt;p&gt;Like I said, a lookup on the targetEntity would potentially trigger a huge cascade of metadata loading throughout the whole domain model. Then the targetEntity has associations and so on and so on.&lt;/p&gt;</comment>
                    <comment id="12916" author="beberlei" created="Tue, 11 May 2010 17:19:19 +0000"  >&lt;p&gt;This was implemented in the latest commit.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>