Project VCLServer.exe raised exception class EUnsupportedMemberType with message 'Mapping error: Unsupported type Variant declared in member Tregistrations.FType_'.
ExceptionMessage="Mapping error: Unsupported type Variant declared in member Tregistrations.FType_"
ExceptionName="EUnsupportedMemberType"
ExceptionDisplayName="EUnsupportedMemberType"
I assume this is because MySql type Enum is not supported. Is there a workaround for it?
The error indicates that the field Registrations.FType is declared as Variant. Such field/property type is not supported by Aurelius, so you must use a type that is supported.
I don't know exactly how Enum is treated by FireDAC (if that's what you are using), but you can simply map such field to the field type returned by FireDAC.
Its actually a character. Defining it as a enum with values means that the database does the final validation on it. But firedac is treating it as a variant.
Mapping is going to be a problem. Every time I change the database, I have to generate the entities again. Which creates a new file.
Related question. How can I get the Generate Entities function to use the same filename I used last time (and the same location).
Well, it's a single field and you can manually change the type. Or use customization scripts in TMS Data Modeler and simply automate it, so every time the entities are generated the script automatically change the type from Variant to string (or Char).
References:
Use TMS Data Modeler, it's more convenient, save the project file, it saves the location.