You are not logged in.
Hi everyone,
I am working with mORMot 1 and MS SQL Server. When using `CreateMissingTables` (or the ORM schema generation), string properties are mapped by default to `NVARCHAR` globally.
This makes total sense since Unicode is standard, and `VARCHAR` is mostly deprecated for general text. However, I have a specific scenario where a legacy external software reads these tables and strictly requires UUID fields to be stored as standard `VARCHAR` (non-Unicode) instead of `NVARCHAR`.
I inspected the mORMot source code to see if a string field type could be overridden / set in the model definition, but the properties/types seem read-only or tightly bound to the global MS SQL driver mapping.
Currently, our workaround is running a post-creation script with an `ALTER TABLE ... ALTER COLUMN` to change those specific UUID columns from `NVARCHAR` to `VARCHAR`.
Is there a built-in way in mORMot 1 to declare a specific string property as an ANSI `VARCHAR` column during table creation, or is post-scripting via `ALTER` the recommended approach for this kind of legacy integration?
Thanks in advance!
Offline