<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 00:53:10 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-852/DDC-852.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-852] An easy way of generally setting the default id name/foreign key name suffix doctrine uses</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-852</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Doctrine 2 is currently using &quot;id&quot; as the default name for identifier columns, and &quot;_id&quot; as suffix for corresponding foreign key columns. I think this is quite reasonable in most cases.&lt;/p&gt;

&lt;p&gt;Now, assuming that for any reason I wanted to change this to something else for &lt;b&gt;all&lt;/b&gt; relationships, currently there does not seem to be any easy way to do it.&lt;br/&gt;
You will have to give a complete JoinColumn definition on every single relationship declaration, like (assuming that I want the new ID name to be &quot;dbID&quot;):&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ManyToOne(targetEntity=&quot;persistentData\model\import\Whatever&quot;, inversedBy=&quot;someReferenceThatPointsHere&quot;)&lt;/li&gt;
	&lt;li&gt;@JoinColumn(name=&quot;whatever_dbid&quot;, referencedColumnName=&quot;dbId&quot;)&lt;br/&gt;
  */&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The reason why I am doing this is that I am doing a 1:1 data import based on a data model that is already defined, and it just happens to contain properties named &quot;id&quot;,&lt;br/&gt;
which unfortunately even have a problem-domain meaning. So instead of mapping those problem-domain properties to something else (breaking my 1:1 convention), or&lt;br/&gt;
using something that does have a problem-domain-meaning as a primary key (which I consider bad practice), I thought I might just use purely technical ids and instruct&lt;br/&gt;
doctrine to choose a different name for those. This is, fortunately, possible. But unless I am missing something here, it needs to be specified on every single relationship.&lt;/p&gt;

&lt;p&gt;It would be great to have a less redundant way of configuring Doctrine to use a different name/suffix generally, e.g. by calling a setter method on the configuration object, like&lt;br/&gt;
$configuration-&amp;gt;setDefaultIdColumnName().&lt;/p&gt;</description>
                <environment></environment>
            <key id="12050">DDC-852</key>
            <summary>An easy way of generally setting the default id name/foreign key name suffix doctrine uses</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</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="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="dalvarez">Daniel Alvarez Arribas</reporter>
                        <labels>
                    </labels>
                <created>Sun, 31 Oct 2010 23:20:48 +0000</created>
                <updated>Thu, 5 Jul 2012 22:14:31 +0000</updated>
                    <resolved>Sat, 24 Dec 2011 16:47:15 +0000</resolved>
                            <version>2.0-BETA4</version>
                                <fixVersion>2.3</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="14653" author="mjh_ca" created="Mon, 1 Nov 2010 03:09:26 +0000"  >&lt;p&gt;Related to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-559&quot; title=&quot;Allow table name and column names to be modified by a user-supplied inflector&quot;&gt;&lt;del&gt;DDC-559&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17099" author="beberlei" created="Sat, 24 Dec 2011 16:46:07 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/241&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/241&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17101" author="guilhermeblanco" created="Sat, 24 Dec 2011 16:47:15 +0000"  >&lt;p&gt;FIxed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/abb258c951dd416fc5325ef548d15c7acd35703e&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/abb258c951dd416fc5325ef548d15c7acd35703e&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18213" author="beberlei" created="Thu, 5 Jul 2012 22:14:31 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-391&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/391&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/391&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>