MyBatis Version 1.6.2 GA
I use option 1) (with both .Net 2.0 and 4.0) and it works. DateTime and
Guid types behaves the very same way. I have planty of DateTime?
property simply mapped as DateTime and nullable property type is
correctly handled by MyBatis. Moreover
public class Job
{
private DateTime? _lastExecutionDate;
//..........
public DateTime? LastExecutionDate {
get { return lastExecutionDate; }
set { lastExecutionDate = value; }
}
}
//WORKING MAPPING (nullable handled correctly)
<result property="LastExecutionDate" column="LastExecutionEndDate"
type="DateTime" dbType="DateTime" />
//NOT WORKING MAPPING (please note the question mark in attribute type):
MyBatis fails to configure itself
<result property="LastExecutionDate" column="LastExecutionEndDate"
type="DateTime?" dbType="DateTime" />
Andrea