|
How do I set a field to map to
or
Updated at 02.04.2010 10:02:29It seems the best solution is to use DomainUpgradeMode.PerformSafely and then modifying the column type in SQL script. I suggest to add the column type customization feature in future version, something like
How to submit feature request to DO team? This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by ccchai. |
|
Hello, ccchai. The answer depends on using of a legacy support feature of DataObjects.Net I'll describe both cases. You use a regular (DO managed) database. By default string fields have NVARCHAR(N) type, where N is determined by a fancy algorithm. If you do not specify value for Field.Length property maximal supported length is used:
If you specify any value that is less than maximal supported length that value is used:
If you specify any value that is greater than maximal supported length than MAX is used:
To ensure portability across various RDBMS-es that may have different maximal length of character columns we recommend the following approach:
There is no way to set column type for DateTime field when using non-legacy mode. For SQL Server 2005 DATETIME SQL type is used. For SQL Server 2008 DATETIME2 SQL type is used. You use a legacy database mode. In this case DataObjects.Net will try to fit your needs and your database.
It does not change your database but only validate it to be compatible with your model.
All rules of choosing string types still apply.
However, column type can be |
