c# - fluent nHibernate map YesNo when column is nullable -
i'm using fluent nhibernate map a database flag column "y"/"n" bool
property:
map(x => x.enabled).column("enabled_flag").customtype("yesno");
the question is, how 1 specify how map null? null mapped true, false, exception?
update
the default settings seems map null false. that, still wondering how override true?
if want change functionality of null case have create own custom type - derive iusertype.
i have done similar dates (where 0 date of 01-01-0001 cant save mssql) , guids want insert null instead of guid.empty)
creating own user type gives ability override nullsafeset , nullsafeget methods - want (change handling of nulls @ read or write) might able inherit original yesno type
Comments
Post a Comment