<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 25 09:00:01 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+DC+AND+resolution+%3D+Unresolved+AND+component+%3D+Inheritance+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+DC+AND+resolution+%3D+Unresolved+AND+component+%3D+Inheritance+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="9" total="9"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DC-924] type mismatch for keyfield in column aggregation</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-924</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;This is the doc exemple on column aggregation inheritance :&lt;/p&gt;

&lt;p&gt;Entity:&lt;br/&gt;
  columns:&lt;br/&gt;
    username: string(20)&lt;br/&gt;
    password: string(16)&lt;br/&gt;
    created_at: timestamp&lt;br/&gt;
    updated_at: timestamp&lt;/p&gt;

&lt;p&gt;User:&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Entity&lt;br/&gt;
    type: column_aggregation&lt;br/&gt;
    keyField: type&lt;br/&gt;
    keyValue: 1&lt;/p&gt;

&lt;p&gt;Group:&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Entity&lt;br/&gt;
    type: column_aggregation&lt;br/&gt;
    keyField: type&lt;br/&gt;
    keyValue: 2&lt;/p&gt;

&lt;p&gt;But the keyField (type) is created as VARCHAR(255) so PostgreSQL return an error on applying inheritance condition :&lt;/p&gt;

&lt;p&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42883&amp;#93;&lt;/span&gt;: Undefined function: 7 ERROR:  operator does not exist: character varying = integer         &lt;br/&gt;
  LINE 1: ...D s.application = &apos;frontend&apos; AND s.lft = 1) AND (s.type = 2)                                     &lt;br/&gt;
                                                                     ^                                        &lt;br/&gt;
  HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.&lt;/p&gt;

&lt;p&gt;I found this with symfony sfFilebasePlugin on sfFilebase:create-root task.&lt;/p&gt;</description>
                <environment>PostgreSQL</environment>
            <key id="12095">DC-924</key>
            <summary>type mismatch for keyfield in column aggregation</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="nono">Arnaud Morvan</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Nov 2010 12:02:12 +0000</created>
                <updated>Thu, 11 Nov 2010 12:02:12 +0000</updated>
                                    <version>1.2.3</version>
                                <fixVersion>1.2.3</fixVersion>
                                <component>Inheritance</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1015] bindComponent not called before inherited classes base definitions</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1015</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;If I define a base model:&lt;/p&gt;

&lt;p&gt;Entity:&lt;br/&gt;
  connection:  other&lt;br/&gt;
  columns:&lt;br/&gt;
    name: {}&lt;br/&gt;
    size:    {}&lt;/p&gt;

&lt;p&gt;and inherited model:&lt;/p&gt;

&lt;p&gt;Box:&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Entity&lt;br/&gt;
    type: column_aggregation&lt;/p&gt;


&lt;p&gt;Then file with base definition of Box does not contain bindComponent sentence to bind Box model with connection specified for Entity model.&lt;/p&gt;</description>
                <environment>symfony 1.4</environment>
            <key id="12786">DC-1015</key>
            <summary>bindComponent not called before inherited classes base definitions</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="ardi">Adrian Nowicki</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Jul 2011 21:21:12 +0000</created>
                <updated>Mon, 4 Jul 2011 21:21:12 +0000</updated>
                                                                    <component>Inheritance</component>
                <component>Schema Files</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-619] preHydrate/postHydrate events do not use proper sub-class component</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-619</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I am trying to use preHydrate/postHydrate with my models that use inheritance. The problem is that when using the parent table is used to query the records, the preHydrate/postHydrate events are passed to the parent record class instead of the proper sub-class for the current record.&lt;/p&gt;

&lt;p&gt;Using the example schema below, if I do a findAll() on the Person table and it contained two Student records and one Professor record... preHydrate would get called on Person instead of Student and Professor. This also applies for any listeners that are registered on Student/Professor and not Person.&lt;/p&gt;

&lt;p&gt;Person:&lt;br/&gt;
  columns:&lt;br/&gt;
    name: &lt;/p&gt;
{ type: string(50) }

&lt;p&gt;Student:&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Person&lt;br/&gt;
    type: column_aggregation&lt;br/&gt;
    keyField: type&lt;br/&gt;
    keyType: 1&lt;/p&gt;

&lt;p&gt;Professor:&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Person&lt;br/&gt;
    type: column_aggregation&lt;br/&gt;
    keyField: type&lt;br/&gt;
    keyValue: 2&lt;/p&gt;
</description>
                <environment>PHP 5.2.11 (cli), Doctrine 1.2 (Revision: 7537)</environment>
            <key id="11179">DC-619</key>
            <summary>preHydrate/postHydrate events do not use proper sub-class component</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="mlehner">Matt Lehner</reporter>
                        <labels>
                    </labels>
                <created>Tue, 6 Apr 2010 14:55:23 +0000</created>
                <updated>Mon, 14 Jun 2010 09:28:51 +0000</updated>
                                    <version>1.2.0</version>
                <version>1.2.1</version>
                <version>1.2.2</version>
                                                <component>Inheritance</component>
                <component>Record</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-614] Separate the properties of the parent and the children</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-614</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I want to talk about the inheritance, simple type and columns_aggregation.&lt;/p&gt;

&lt;p&gt;Here an example of parent classes and two sub-classes : &lt;a href=&quot;http://pastebin.com/5qJKtgp1&quot; class=&quot;external-link&quot;&gt;http://pastebin.com/5qJKtgp1&lt;/a&gt;&lt;br/&gt;
Here the generated models classes : &lt;a href=&quot;http://pastebin.com/j2PmT7sd&quot; class=&quot;external-link&quot;&gt;http://pastebin.com/j2PmT7sd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To sum up : The parent class is Show, and the sub-classes are Video and Playlist.&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;A Show have a title.&lt;/li&gt;
	&lt;li&gt;A Video have a filename.&lt;/li&gt;
	&lt;li&gt;A Playlist have a user.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The problem that appear with the generated models, Is that the following code is working.&lt;br/&gt;
$playlist = Doctrine_Core::getTable (&quot;Model_Playlist&quot;)-&amp;gt;find (3);&lt;br/&gt;
$playlist-&amp;gt;filename;&lt;/p&gt;

&lt;p&gt;Or, the POO concept want that the filename property doesn&apos;t exist/available on a Playlist object. And Doctrine should throw an Exception ! Or, It is not the case.&lt;/p&gt;

&lt;p&gt;The solution is to move the generated code of the sub-classes into there own classes.&lt;br/&gt;
Here the complete solution : &lt;a href=&quot;http://pastebin.com/LzTG10P7&quot; class=&quot;external-link&quot;&gt;http://pastebin.com/LzTG10P7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem with the one-to-one or many-to-many relationship is still the same.&lt;/p&gt;

&lt;p&gt;The solution is more POO compliant.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11165">DC-614</key>
            <summary>Separate the properties of the parent and the children</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="armetiz">Thomas Tourlourat - Armetiz</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Apr 2010 05:45:08 +0000</created>
                <updated>Fri, 2 Apr 2010 05:58:41 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Inheritance</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-536] Duplicate CREATE TABLE entries in schema.sql when using column_inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-536</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When creating a model involving column_inheritance the CREATE TABLE statement gets duplicated.&lt;/p&gt;

&lt;p&gt;The second CREATE TABLE include an index for the keyField.&lt;/p&gt;

&lt;p&gt;Test doctrine generated models and generated schema.sql attached.&lt;/p&gt;</description>
                <environment>MySQL 5 / PHP 5.3.1 / Symfony 1.4.3 (branch) / Doctrine 1.2.1 / Mac OSX</environment>
            <key id="10981">DC-536</key>
            <summary>Duplicate CREATE TABLE entries in schema.sql when using column_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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="webpragmatist">webPragmatist</reporter>
                        <labels>
                    </labels>
                <created>Tue, 2 Mar 2010 12:38:25 +0000</created>
                <updated>Thu, 18 Nov 2010 01:44:16 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Inheritance</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="11973" author="webpragmatist" created="Tue, 2 Mar 2010 13:05:19 +0000"  >&lt;p&gt;It seems this issue is related to using array_unique() and databases which doctrine creates index along with the CREATE TABLE statement.&lt;/p&gt;

&lt;p&gt;This does not occur on sqlite as shown above in the console-log.txt (this db uses the CREATE INDEX statement).&lt;/p&gt;</comment>
                    <comment id="11975" author="sacho" created="Tue, 2 Mar 2010 13:25:36 +0000"  >&lt;p&gt;Yes, it seems SQL CREATE TABLE statements are generated for each of the children as well, but with sqlite, array_unique() filters out the ones that are &quot;extra&quot;.&lt;br/&gt;
But the MySQL statements all differ(due to indexes, I don&apos;t know if other things can cause them to differ as well), and as such all are left.&lt;/p&gt;</comment>
                    <comment id="12867" author="boutell" created="Fri, 7 May 2010 12:22:40 +0000"  >&lt;p&gt;We&apos;re seeing this issue too. doctrine:build --all --and-load works fine, but doctrine:build-sql generates duplicate CREATE TABLE statements. Our in-house workflow is the former, so the latter came as a surprise. Is there any sign of progress on this one?&lt;/p&gt;</comment>
                    <comment id="13533" author="bascht" created="Wed, 7 Jul 2010 09:14:06 +0000"  >&lt;p&gt;This looks like a Duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-123&quot; class=&quot;external-link&quot;&gt;DC-123&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="14772" author="kerdany" created="Thu, 18 Nov 2010 01:43:39 +0000"  >&lt;p&gt;A little addition to the symptoms of this problem.&lt;/p&gt;

&lt;p&gt;If the one of the child classes has a foreign key to another entity, another Third Create table SQL will be created, which contains the an index on the foreign key column.&lt;/p&gt;

&lt;p&gt;In other words, it seems that an additional create table statement is created for each automatically created index.&lt;/p&gt;

&lt;p&gt;An illustration is in the attached yml and sql schema:&lt;br/&gt;
kerdany_10-11-18-08-30.yml&lt;br/&gt;
kerdany_10-11-18-08-30.sql&lt;/p&gt;

&lt;p&gt;Tom Boutell: doctrine:build --all generates the problem with me!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10413" name="BaseInherited.class.php" size="429" author="webpragmatist" created="Tue, 2 Mar 2010 12:38:25 +0000" />
                    <attachment id="10412" name="BaseInheriter.class.php" size="1525" author="webpragmatist" created="Tue, 2 Mar 2010 12:38:25 +0000" />
                    <attachment id="10871" name="kerdany_10-11-18-08-30.sql" size="633" author="kerdany" created="Thu, 18 Nov 2010 01:42:16 +0000" />
                    <attachment id="10870" name="kerdany_10-11-18-08-30.yml" size="407" author="kerdany" created="Thu, 18 Nov 2010 01:42:16 +0000" />
                    <attachment id="10414" name="sandbox-console.txt" size="1465" author="webpragmatist" created="Tue, 2 Mar 2010 13:05:19 +0000" />
                    <attachment id="10411" name="schema.sql" size="416" author="webpragmatist" created="Tue, 2 Mar 2010 12:38:25 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-778] Aggregate column becomes NULL when using TableClass-&gt;create(array(...))</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-778</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I use aggregate column inheritance, say B extends A, and create a new record instance of B using BTable-&amp;gt;create(array(...values...)). But due to changeset &lt;span class=&quot;error&quot;&gt;&amp;#91;7618&amp;#93;&lt;/span&gt; this fails to set the aggregate column value to the value assigned for B, it becomes NULL.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11598">DC-778</key>
            <summary>Aggregate column becomes NULL when using TableClass-&gt;create(array(...))</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="dennis.verspuij">Dennis Verspuij</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Jul 2010 15:01:17 +0000</created>
                <updated>Wed, 1 Sep 2010 14:39:59 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Inheritance</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14223" author="jwage" created="Wed, 1 Sep 2010 14:39:59 +0000"  >&lt;p&gt;Can you provide some more information and/or a test case?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-418] Inherited models creating NOT NULL restrictions on their parents</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-418</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;to reproduce, create the yaml included in sample.yaml (Note the not-null columns in each subclass)&lt;/p&gt;

&lt;p&gt;if you try to save an OnlineProduct without setting copyright_year, or if you create a print_product without setting website_branding_id, then you will get a not null error.&lt;br/&gt;
Inherited tables should be able to set their own NOT NULL columns without affecting other tables in the inheritance tree (should be handled in the preSave() method? or is there another mechanism?)&lt;/p&gt;</description>
                <environment>Linux skywalker-9 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux&lt;br/&gt;
</environment>
            <key id="10713">DC-418</key>
            <summary>Inherited models creating NOT NULL restrictions on their parents</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="jlukescott">luke scott</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Jan 2010 18:17:58 +0000</created>
                <updated>Mon, 11 Jan 2010 18:19:57 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Attributes</component>
                <component>Inheritance</component>
                <component>Record</component>
                <component>Schema Files</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="11365" author="jlukescott" created="Mon, 11 Jan 2010 18:19:57 +0000"  >&lt;p&gt;YAML format was destroyed during copy &amp;amp; paste!&lt;br/&gt;
I&apos;m attaching the sample yaml, instead of including it in the description&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10279" name="sample.yaml" size="911" author="jlukescott" created="Mon, 11 Jan 2010 18:19:57 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-607] Doctrine concrete inheritance link between tables</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-607</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I pointed out a strange problem:&lt;br/&gt;
I have two tables that are linked with a one to many relation ship.&lt;br/&gt;
Each table has some concrete inherited tables.&lt;br/&gt;
Here is the schema:&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;Batch:
  columns:
    code: string
    is_pure: &lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;

Flask:
  columns:
    batch_id: integer
    code: string
    quantity: integer
  relations:
    Batch:
      local: batch_id
      foreign: id
      foreignType: many
    
ProducedBatch:
  inheritance:
    type: concrete
    &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt;: Batch
  columns:
    production_date: date
    
BoughtBatch:
  inheritance:
    type: concrete
    &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt;: Batch
  columns:
    supplier: string
    
ProducedFlask:
  inheritance:
    type: concrete
    &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt;: Flask
  columns:
    weight: integer
    
BoughtFlask:
  inheritance:
    type: concrete
    &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt;: Flask
  columns:
    price: integer
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problem occurs when I try to populate the database.&lt;br/&gt;
Here is the data:&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;ProducedBatch:
  B1:
    code: Batch1

ProducedFlask:
  F1:
    Batch: B1
    code: Flask1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When loading fixtures, I get a&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;Invalid row key specified: (batch) B1, referred to in (produced_flask) F1&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In fact, Doctrine doesn&apos;t take into account the primary key inherited from Flask table.&lt;br/&gt;
The mapping should be done between parent and child tables.&lt;/p&gt;

&lt;p&gt;The only solution to solve this is to set a relationship between each couple of sub-table (ProducedFlask -&amp;gt; ProducedBatch and BoughtFlask -&amp;gt; BoughtFlask).&lt;/p&gt;</description>
                <environment>Symfony 1.4.3, php5.3.0 (snow leopard version)</environment>
            <key id="11149">DC-607</key>
            <summary>Doctrine concrete inheritance link between tables</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="jc13">Julien Chiron</reporter>
                        <labels>
                    </labels>
                <created>Tue, 30 Mar 2010 05:44:45 +0000</created>
                <updated>Wed, 21 Jul 2010 03:59:18 +0000</updated>
                                                                    <component>Inheritance</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13627" author="etag" created="Wed, 21 Jul 2010 03:59:18 +0000"  >&lt;p&gt;It is very strange that the doctrine inheritance system don&apos;t inherite all the relationship of the mother-table on all sub-table. I think that it will be a very good improvement to fix this problem.&lt;/p&gt;

&lt;p&gt;For example if you are this model :&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;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unable to find source-code formatter for language: yml.&lt;/span&gt; Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml&lt;/div&gt;&lt;pre&gt; 
motherTable:
  columns:
     code: string
     relationTable_id: integer
  relation:
     relationTableRelation:
            local: relationTable_id
            foreign: id
            type: one     

subTable:
    inheritance:
        type: concrete
    colums:
        name: string

relationTable:
    columns:
        code: integer
    relations:
        motherTableRelation:
            local: id
            foreign: relationTable_id
            type: many
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;In this example, the relationTableRelation will be inherited, it is good but the other side of the relation in relation table will always go on motherTable and not on subTable, but motherTable is always empty, moreover subTable don&apos;t share its ID with motherTable, so this side of the relationship is unusefull because we can find subTable element in relation with a relationTable element.&lt;/p&gt;

&lt;p&gt;It will be good to find a solution to this issue &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>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-464] [Inheritance] Couldn&apos;t save record with inheritance by a relationship if the record has no column modified (solution proposed)</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-464</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Please consider the following TestCase&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;Inheritance with no property setted, saved by relationship&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;class Doctrine_Ticket_DC464_TestCase &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine_UnitTestCase
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function prepareTables()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tables[] = &apos;Ticket_DC464_Entity&apos;;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tables[] = &apos;Ticket_DC464_Article&apos;;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tables[] = &apos;Ticket_DC464_User&apos;;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tables[] = &apos;Ticket_DC464_Group&apos;;
        parent::prepareTables();
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function testTest()
    {
        $User = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Ticket_DC464_User();

        $Article = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Ticket_DC464_Article();
        $Article-&amp;gt;title = &apos;my first article&apos;;
        $Article-&amp;gt;Author = $User;

        $Article-&amp;gt;save();

        $UserFetched = Doctrine::getTable(&apos;Ticket_DC464_User&apos;)-&amp;gt;find(1);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertTrue($UserFetched &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Ticket_DC464_User);
       &lt;span class=&quot;code-comment&quot;&gt;//$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEqual($UserFetched-&amp;gt;type, 1);
&lt;/span&gt;

    }
}



class Ticket_DC464_Entity &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine_Record
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setTableDefinition()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;id&apos;, &apos;integer&apos;, 11, array(&apos;autoincrement&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, &apos;primary&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;));
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;facultative_field&apos;, &apos;string&apos;, 255);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;type&apos;, &apos;string&apos;, 255);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;setSubClasses(array(
             &apos;Ticket_DC464_User&apos; =&amp;gt;  array(&apos;type&apos; =&amp;gt; 1),
             &apos;Ticket_DC464_Group&apos; =&amp;gt; array(&apos;type&apos; =&amp;gt; 2),
        ));

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;option(&apos;type&apos;, &apos;InnoDB&apos;);
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setUp()
    {
    }
}

class Ticket_DC464_User &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Ticket_DC464_Entity { }
class Ticket_DC464_Group &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Ticket_DC464_Entity { }

class Ticket_DC464_Article &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine_Record
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setTableDefinition()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;id&apos;, &apos;integer&apos;, 11, array(&apos;autoincrement&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, &apos;primary&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;));
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;title&apos;, &apos;string&apos;, 30);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;author_id&apos;, &apos;integer&apos;, 11);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;option(&apos;type&apos;, &apos;InnoDB&apos;);
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setUp()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasOne(&apos;Ticket_DC464_User as Author&apos;, array(
             &apos;local&apos; =&amp;gt; &apos;author_id&apos;,
             &apos;foreign&apos; =&amp;gt; &apos;id&apos;));
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Notice that in the test, the $User instance has no property setted (in fact in this test, the &quot;useless_field&quot; in the model is... useless).&lt;/p&gt;

&lt;p&gt;This test fails (the $User object is not saved) because the method UnitOfWork-&amp;gt;saveRelatedLocalKeys() - called in saveGraph(), itself called by $Article-&amp;gt;save() - returns false because no column has been modified (line 395).&lt;/p&gt;



&lt;p&gt;To fix this, the Record-&amp;gt;assignInheritanceValues() should be executed in top of isModified(), or for each related object in UnitOfWork-&amp;gt;saveRelatedLocalKeys() (and probably UnitOfWork-&amp;gt;saveRelatedForeignKeys() too).&lt;/p&gt;

&lt;p&gt;I&apos;ve attached the test.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10806">DC-464</key>
            <summary>[Inheritance] Couldn&apos;t save record with inheritance by a relationship if the record has no column modified (solution proposed)</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="colin.darie">Colin Darie</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Jan 2010 23:51:39 +0000</created>
                <updated>Wed, 9 Jun 2010 06:50:22 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Inheritance</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="11527" author="colin.darie" created="Sat, 30 Jan 2010 02:51:11 +0000"  >&lt;p&gt;Fix test with the right prefixes&lt;/p&gt;</comment>
                    <comment id="12259" author="jwage" created="Mon, 15 Mar 2010 17:51:17 +0000"  >&lt;p&gt;Do you have a patch for the issue too?&lt;/p&gt;</comment>
                    <comment id="12286" author="colin.darie" created="Tue, 16 Mar 2010 13:32:52 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;no I doesn&apos;t have a patch for this, because I was not sure what the best way to solve this.&lt;br/&gt;
However, patching the isModified() method is maybe the safest way, with a simple  $this-&amp;gt;assignInheritanceValues(); at top (around line 2100).&lt;/p&gt;</comment>
                    <comment id="13210" author="jwage" created="Tue, 8 Jun 2010 16:51:40 +0000"  >&lt;p&gt;Can you provide a patch for that change then so I can see it and test it? Thanks, Jon&lt;/p&gt;</comment>
                    <comment id="13247" author="colin.darie" created="Wed, 9 Jun 2010 06:50:22 +0000"  >&lt;p&gt;I&apos;ve attached the patch.&lt;/p&gt;

&lt;p&gt;Once again, this patch fix the issue but there is maybe a better way to fix it to avoid the assignInheritanceValues() at each time.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10332" name="DC464TestCase.php" size="3293" author="colin.darie" created="Sat, 30 Jan 2010 02:51:11 +0000" />
                    <attachment id="10634" name="Record.php.patch" size="487" author="colin.darie" created="Wed, 9 Jun 2010 06:50:22 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>