Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Inheritance

 Post Reply Post Reply
Author
Araujo Carla View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2014
Posts: 232
Post Options Post Options   Quote Araujo Carla Quote  Post ReplyReply Direct Link To This Post Topic: Inheritance
    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).
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2386
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Araujo Carla View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2014
Posts: 232
Post Options Post Options   Quote Araujo Carla Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jul 2014 at 5:49am
I already sent, did you received?
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2386
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Araujo Carla View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2014
Posts: 232
Post Options Post Options   Quote Araujo Carla Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jul 2014 at 5:28am
Hi, Wagner
  Works perfect.
  Thanks Wagner, great job
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down