Setting-DisplayName on TCustomAureliusDataset

It's really nice, how TCustomAureliusDataset appends Fields of the given Class.

Can you extract the part within the loop in a seperate protected Method, so that we could use this with our own loop? (for example if we have to use GetClassStateMembers)

As a second request, a Callback-Function for setting TFieldDef.DisplayName would be nice.
function (aOptimization: TRttiOptimization): string of object; // Get-Custom-Displayname
aOptimization should be current member, Result will be DisplayName for this field.

Callback-Function could be a Datasetfield or a Parameter, just what you think is best.

What exact part in the code are you referring to?

Can't you simply iterate through all fields and set the DisplayName manually after the fields are loaded?

AddFieldDefsFromClass should look like this at the end:

procedure TCustomAureliusDataset.AddFieldDefsFromClass(const APrefix: string;
  AClass: TClass; ADepth: Integer);
  O: TRttiOptimization;
  for O in Explorer.GetClassVisibleMembers(AClass, True) do
    AddFieldDefFromOptimization(aPrefix, aClass, aDepth, O, AddFieldDefsFromClass);

Recursion for TFieldInclusion.Entity would be done by the last parameter.

Well, I could, but it would be faster, if this could appear in a single loop.
Especially, if you think of closing, clearing Manager, reopening the dataset, because you have to load changes from outside.

I just recognized, that you are initializing FieldDefs, for those TFieldDef does not provide a posibility for setting DisplayName at all..
So this second request is useless at all...

Ok. In next release we can refactor the code so that we have a AddFieldDefsFromRttiInfo method separated.