0 votes

When I define an Inheritance (Single Table) on an entity, then remove it as well as all the child entities and the type column, there is still the definition left over and exported. I cannot delete it in ORM Designer, I have to manually edit the ORMD XML in a text editor.

See below for ORMD model before and after deletion as well as a screenshot:
Image caption

Model Version 1:

<?xml version="1.0"?>
<orm-designer version="2.2.4.749" name="Ormd2" mvc="Symfony2" orm="Doctrine2" uuid="d76ad543-e605-48a5-95bb-de75d6de896d">
  <module name="MainModule" uuid="fde41f8b-f883-40d4-9cda-6adfae7389fd">
    <entity name="OtherEntity" uuid="a86a712c-6d35-4586-a880-324b9a66098a">
      <inheritance-child derived-from="SampleEntity" discriminator-value="OtherEntity" caption="New inheritance" uuid="aaccb6af-9180-432b-8ebc-34506875c9a8"/>
    </entity>
    <entity name="SampleEntity" uuid="1db8bf02-4bcd-4232-8305-17af4c80bd74">
      <field name="id" type="integer" required="true" unique="true" primary="true" auto-increment="true" uuid="79f7f8d4-c26e-492f-9281-f2d0f531c6d5"/>
      <field name="name" type="string" size="255" uuid="e3590f9c-f052-47fe-ad20-8fb009646e49"/>
      <field name="type" type="string" required="true" uuid="6e8f4578-c03a-4f28-b112-397857f301c6"/>
      <inheritance-parent discriminator-field="type" type="SINGLE_TABLE" uuid="4f338887-215f-4357-9b49-e1b10a3c9b7e"/>
    </entity>
  </module>
  <visual-data>
    <entity uuid="1db8bf02-4bcd-4232-8305-17af4c80bd74" position-x="10" position-y="20"/>
    <entity uuid="a86a712c-6d35-4586-a880-324b9a66098a" position-x="121" position-y="93" size-x="0" size-x2="20" size-y="0" size-y2="20"/>
    <inheritance-child uuid="aaccb6af-9180-432b-8ebc-34506875c9a8" caption1-position-x="0" caption1-position-y="0" center-position-x="0" center-position-y="0"/>
    <project uuid="d76ad543-e605-48a5-95bb-de75d6de896d" size-x="0" size-x2="331" size-y="0" size-y2="285"/>
    <module uuid="fde41f8b-f883-40d4-9cda-6adfae7389fd" bk-color="4294375930" position-x="61" position-y="72" size-x="11" size-x2="220" size-y="22" size-y2="163"/>
  </visual-data>
</orm-designer>

Model Version 2:

<?xml version="1.0"?>
<orm-designer version="2.2.4.749" name="Ormd2" mvc="Symfony2" orm="Doctrine2" uuid="d76ad543-e605-48a5-95bb-de75d6de896d">
  <module name="MainModule" uuid="fde41f8b-f883-40d4-9cda-6adfae7389fd">
    <entity name="SampleEntity" uuid="1db8bf02-4bcd-4232-8305-17af4c80bd74">
      <field name="id" type="integer" required="true" unique="true" primary="true" auto-increment="true" uuid="79f7f8d4-c26e-492f-9281-f2d0f531c6d5"/>
      <field name="name" type="string" size="255" uuid="e3590f9c-f052-47fe-ad20-8fb009646e49"/>
      <inheritance-parent type="SINGLE_TABLE" uuid="4f338887-215f-4357-9b49-e1b10a3c9b7e"/>
    </entity>
  </module>
  <visual-data>
    <entity uuid="1db8bf02-4bcd-4232-8305-17af4c80bd74" position-x="10" position-y="20"/>
    <project uuid="d76ad543-e605-48a5-95bb-de75d6de896d" size-x="0" size-x2="331" size-y="0" size-y2="285"/>
    <module uuid="fde41f8b-f883-40d4-9cda-6adfae7389fd" bk-color="4294375930" position-x="61" position-y="72" size-x="11" size-x2="220" size-y="22" size-y2="163"/>
  </visual-data>
</orm-designer>
in Solved by (3.6k points)
recategorized by

2 Answers

0 votes
Best answer

Hi Jorn,

I tried it here but everything works correctly: http://screencast.com/t/C10hOeWVhZ

Could you please try it on latest beta version (http://support.orm-designer.com/402/orm-designer2-beta)? But I'm not aware any code change which could fix this behavior.

Could you please try it on empty project or send me more detailed instructions how to invoke it?

Thanks!

by Skipper developer (141k points)
selected by

Hi Ludek,

you can get to the state which is visible in "Model version 2" if you do not delete the Inheritance itself but the child entity only and then the discriminator column. Then there's the undefined state where inheritance cannot be deleted anymore.

It might be the wrong way, but it's the intuitive way. ;) I want inheritance no more, including the child entities, so I delete all child entities.

Kind regards
Jörn

Thanks for clarification. Now I'm able to invoke it here too.

Fixed. Please download new version from our site:
http://www.orm-designer.com/download-orm-designer

Wow, that was fast!

Confirmed. It is fixed!

No problem ;-). You had sent this bug few minutes before we started with new version release. So we added this fix to this release too.

0 votes

Hi, thanks for reporting this problem. I will check it and let you know.

by Skipper developer (141k points)