The solution is simple. Introduce a new user type JaNeeType, which derives from CharBooleanType.
class JaNeeType : CharBooleanType
{
protected override string FalseString
{
get
{
return 'N';
}
}
protected override string TrueString
{
get
{
return 'J';
}
}
}
At least, that is what I thought. It turns out that the constructor of CharBooleanType is internal, an oversight in NHibernate 1.2. Now the advantage of using Open Source tools comes into sight. I was able to work around this issue by copying the necessary source from CharBooleanType and its base types, until I could compile the class. The end result can be downloaded.