I have similar problem, but the opposite one:
1) I have int? nullable property based on MetaField with HasDefaultValue = true
2) Create an entity and without touching this nullable property try to save record
3) The following exception occurs:
Insert of '30102130-' failed: Telerik.OpenAccess.RT.sql.SQLException: Cannot insert the value NULL into column 'Price', table 'BookShop.dbo.Book'; column does not allow nulls. INSERT fails.
Because value of this nullable property (with default value set in database) is transfered explicitly as NULL in INSERT statement.
I have the following code to initialize mapping configuration for this property:
Tried this code with artificial and normal field, problem persists.
prop = tableMappingConfig.HasArtificialPrimitiveProperty(metaColumn.Name,
Could you please tell me why problem is here?