Extension for generate Aurelius Dictionary

I use the generated Dictionary for queries in Aurelius.
But if I want a join (over CreateAlias) I must use the association name. This is tablename+"List". This is ok.

If I would have the Dictionary Property "Tablename" I could use this.

Is this possible? For the future?

Or something else similar to this solution?

In Code:
The TablePropName is set to: "TheOwnName"

type

  TTheOwnNameTableDictionary = class
  private
    FTablePropName: String;  // This is the NEW one
    FField1: TDictionaryAttribute;
    FField2: TDictionaryAttribute;
    FField3: TDictionaryAssociation;
  public
    constructor Create;
    property TablePropName: String read FTablePropName;  // This is the NEW one
    property Field1: TDictionaryAttribute read FField1;
    property Field2: TDictionaryAssociation read FField2;
    property Field3: TDictionaryAssociation read FField3;
  end;


.........................



constructor TTheOwnNameTableDictionary.Create;
begin
  inherited;
  FTablePropName := 'TheOwnName';             // This is the NEW one
  FField1 := TDictionaryAttribute.Create('Field1');
  FField2 := TDictionaryAssociation.Create('Field2');
  FField3 := TDictionaryAssociation.Create('Field3');
end;





Dictionary indeed is not indicated for associations. For that it's better that you do it manually. We are considering refactoring the dictionary and make it more friendly for associated objects, but still it's just an idea.

1 Like