TAureliusDataSet LoadFieldDefinitions Problem

I have done this numerous times without a problem, but the latest package I create does not show it's classes (actually it's a single class) after the package has been added, and selected, using TAureliusDataset.LoadFieldDefinitions. Any ideas?

unit Entity.Codes;

interface

uses
  Aurelius.Mapping.Attributes;

type
  [Entity]
  [AutoMapping]
  [Table('CODES')]
  [Id('CodeType,CodeValue', TIdGenerator.None)]
  TCodetable = class
  private
    [Column('CODE_TYPE', [TColumnProp.Required], 3)]
    FCodeType: string;

    [Column('CODE_VALUE', [TColumnProp.Required], 10)]
    FCodeValue: string;

    [Column('CODE_DESC', [], 100)]
    FCodeDesc: string;

    [Column('SYSCODE', [], 1)]
    FSysCode: string;

    [Column('CREATEDBY', [], 8)]
    FCreatedBy: string;

    [Column('Ordering')]
    FOrdering: Integer;

  public
    property CodeType: string read FCodeType write FCodeType;
    property CodeValue: string read FCodeValue write FCodeValue;
    property CodeDesc: string read FCodeDesc write FCodeDesc;
    property SysCode: string read FSysCode write FSysCode;
    property CreatedBy: string read FCreatedBy write FCreatedBy;
    property Ordering: Integer read FOrdering write FOrdering;
  end;

implementation

initialization
  RegisterEntity(TCodetable);

end.

Unfortunately no ideas. Any more details you can provide? Differences from your other packages, etc.?

I've tried recreating the package and an app from scratch, but no joy. What is interesting is that when I add a TAureliusDataset to a form (new or old) it always shows a list of Sphinx entities even though there isn't a Sphinx entity package in the loaded list.

Other packages work fine?

Yes my other packages are fine and I just built a new one using the Aurelius demo entities and that worked too. Still don't understand why the Sphinx Entities always show though.

Is it reproducible? Can you provide files and exact steps to reproduce the issue?

Problem solved. It was because the unit was named entity.code.pas - if the unit is named differently, say smx.entity.codes.pas then that works a treat. Seems to be that the unit name starts entity that is the problem

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.