Hi,
I'm trying to map a property that looks like this:
private bool? _isCorrect;
public bool IsCorrect { get
{
if (_isCorrect == null)
{
_isCorrect = CalculateIsCorrect();
}
return (bool)_isCorrect;
}
<property name="IsCorrect" type="Boolean" column="IsCorrect" access="nosetter.camelcase-underscore" not-null="false" />
The setter doesn't work correctly when I do this. If I make the property nullable (bool?) then it works as expected, but I do not want it to be nullable. I've tried lots of things, including setting the type to System.Nullable`1[[System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Any ideas?
Thanks,
Aaron
|