ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Selke" <tse...@liquidhub.com>
Subject RE: Nullable DateTime support?
Date Thu, 31 May 2007 16:47:47 GMT
So I found (again) the documentation that states that all nullable types,
including DateTime, are supported along with the documentation that there is
an intrinsic typeAlias to convert DateTime? into Nullable<DateTime>.


Just to try and do a sanity check, I went back to my parameters and changed
them to remove the explicit, optional attributes.  So, for example, the
DateTime? properties went from the previous example to:


<parameter property="BirthDate" column="BirthDate" />


I am now able to successfully load my entire set of sqlMaps without an
initialization/loading error.  However, I still think this indicates a bug
in the handling/processing of the "type" attribute of the "parameter" and
"argument" elements.




From: Tony Selke [mailto:tselke@liquidhub.com] 
Sent: Thursday, May 31, 2007 12:06 PM
To: user-cs@ibatis.apache.org
Subject: Nullable DateTime support?


I am getting the following error . . .


{"Could not load type from string value 'System.DateTime?'.":""}

at IBatisNet.Common.Utilities.TypesResolver.TypeResolver.ResolveType(String


. . . when trying to load a parameter like this . . .


<parameter property="BirthDate" column="BirthDate" dbType="datetime"
type="System.DateTime?" />



I found a note from Oct 2005 in the list archives that indicated the need
for a custom DateTimeTypeHandler to deal with nullable DateTimes, but I
suspect that this might have a better way to be addressed now.  All of the
other nullable, native types seem to work fine.  It's just the DateTime
structure that seems to be throwing an error.


Am I missing something?



View raw message