Hello!
Is possible to add transient properties to a XData class? Here's an example
type
[Entity]
[Table('DocHeaders')]
[Id('FId', TIdGenerator.IdentityOrSequence)]
[EntityAuthorize]
TDocument = class
private
[Column('Id', [TColumnProp.Required, TColumnProp.NoInsert, TColumnProp.NoUpdate])]
FId: Integer;
[Column('DocYear', [TColumnProp.Required])]
FDocYear: Integer;
[Column('DocId', [TColumnProp.Required])]
FDocId: Integer;
end;
TDocumentIdentityHelper = class helper for TDocument
private
function GetDocUniqId: string;
public
[Transient]
property DocUniqId: string read GetDocUniqId;
end;
function GetDocUniqId: string;
begin
Result := self.DocYear.ToString + '-' + self.DocId.ToString;
end;
Reason: I create entites with the TMS Data Modeler and need to add a property that dynamically calculates a result (let's say that returns a concatenation of strings that are other non-transient properties).