Print Page | Close Window

Inheritance

Printed From: TMS Software
Category: Business Tools
Forum Name: Data Modeler
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=4011
Printed Date: 21 Nov 2019 at 4:46am


Topic: Inheritance
Posted By: Araujo Carla
Subject: Inheritance
Date Posted: 16 Jul 2014 at 5:05am
Hi, this is the export aurelius generated by Data Modeler:
...
  [Entity]
  [Table('Entity')]
  [Inheritance(TInheritanceStrategy.JoinedTables)]
  [Sequence('Id_Entity')]
  [Id('FId', TIdGenerator.IdentityOrSequence)]
  TEntity = class
  private
    [Column('Id', [TColumnProp.Required])]
    FId: integer;
    [Column('Name', [TColumnProp.Required], 50)]
    FName: string;
  public
    property Id: integer read FId write FId;
    property Name: string read FName write FName;
  end;
 
  [Entity]
  [Table('Customer')]
  [PrimaryJoinColumn('Id')]
  TCustomer = class(TEntity2)
  private
    [Column('NIF', [TColumnProp.Required], 50)]
    FNIF: string;
  public
    property NIF: string read FNIF write FNIF;
  end;
 
  [Entity]
  [Table('Entity2')]
  [Inheritance(TInheritanceStrategy.JoinedTables)]
  [PrimaryJoinColumn('Id')]
  TEntity2 = class(TEntity)
  private
    [Column('Address', [TColumnProp.Required])]
    FAddress: integer;
  public
    property Address: integer read FAddress write FAddress;
  end;
 
  [Entity]
  [Table('Staff')]
  [PrimaryJoinColumn('Id')]
  TStaff = class(TEntity)
  end;
 ...
When compliling, error is raise "[dcc32 Error] DB.Schema.pas(46): E2086 Type 'TEntity2' is not yet completely defined".

if you move  TEntity2 definition, between TEntity and TCustomer definition, everything is OK (of course).



Replies:
Posted By: Wagner R. Landgraf
Date Posted: 16 Jul 2014 at 8:21am
Hi, can you please send us your Data Modeler project so we can fix it here? You can send it to support@tmssoftware.com, thank you.


Posted By: Araujo Carla
Date Posted: 18 Jul 2014 at 5:49am
I already sent, did you received?


Posted By: Wagner R. Landgraf
Date Posted: 21 Jul 2014 at 9:01pm
Yes, thanks. We have fixed the issue, Data Modeler 2.3.2 is now released with that fix.


Posted By: Araujo Carla
Date Posted: 22 Jul 2014 at 5:28am
Hi, Wagner
  Works perfect.
  Thanks Wagner, great job
 



Print Page | Close Window