Special mapping for Sets


I'd like to know if is there any possibility to implement mapping for enum sets fields.
Like this:

TTest = (t1, t2, t3);
TTestSet = set of TTest;

TMyObject = class
FTest: TTestSet;

The persistence could be like a string text separated by comma by two ways:
1- persisting the same name of enum
2- persisting the ordinay number of enum

This resource is present in XData Json, but isn't in Aurelius.

Hi Antonio,

For now there is no such feature built-in in Aurelius. But you can workaround it by adding a property to your entity class with a getter and setter that converts the set to/from a string, and then map your class to persist that property instead of the set field.

Hi wagner

thanks for the return.
So, that is what I was doing! But it's a suggestion of improvement.

Because on this case is necessary to pay attention of excluding string field of persistence with transient attribute, like the JsonExclude .. and including the property in both cases.

1 Like

You can file a request in our feature request system.