wlandgraf
(Wagner Landgraf)
February 13, 2024, 11:18am
2
Hi @Burgess_John , welcome to TMS Support Center.
Data Modeler is not aware of such type, thus it creates the properties that way.
Easiest way to work around this is to use a customization script to modify all such properties on the fly, add a setter and change the type to the value you want.
These topics in Support Center show examples for a similar case:
Thanks Wagner,
One last question: Is there any documentation or source code about these scripts other than datamodeller_manual.pdf? For example TGDAOField.
Also I put the following code into script in order to convert every Date field even if I forget to override in the mappings. But documentation will be very helpful.
procedure OnColumnGenerated(Args: TColumnGeneratedArgs);
begin
if Args.DBField.DataTypeName = 'Date' then
begin
// What about the required fields then this is a wrong ove…
Hi Mark, Sorry for the delay in answering. The easiest approach is just declare your enumerated types in a separated unit (for example, "Entities.EnumeratedTypes", and then use the script to change the type of the field/property to the enumerated you want. For example:
procedure OnColumnGenerated(Args: TColumnGeneratedArgs);
begin
if Args.DBField.FieldName = 'VehicleType' then
begin
Args.Prop.Prop…