c# - NHibernate DateTime for query, Overflow exception caused by string format -
nhibernate generating following sql not supported firebird;
where (struct_cas0_.deleted null) , struct_cas0_.account_id = 372 /* @p0 */ , struct_cas0_.date_record <= '2005-01-01t00:00:00.00' /* @p1 */ , struct_cas0_.date_record >= '2006-12-31t00:00:00.00' /* @p2 */
the above sql fails in firebird error "overflow occurred during data type conversion. conversion error string '2005-01-01t00:00:00.00'"
if remove 't' query, firebird executes query without problem;
where (struct_cas0_.deleted null) , struct_cas0_.account_id = 372 /* @p0 */ , struct_cas0_.date_record <= '2005-01-01 00:00:00.00' /* @p1 */ , struct_cas0_.date_record >= '2006-12-31 00:00:00.00' /* @p2 */
is there way can have nhibernate remove 't' when converting datetime queryable string?
an additonal question raised after reasearch. appears firebird not support combined date , fime format datetime format (iso8601) http://en.wikipedia.org/wiki/iso_8601 time discrimiator character ("t"). can confirmed don't understand why database fail support such standard (sortable) date format?
if "t" dropped, date supported.
are sure have correct driver, etc.. per question how setup nhibernate visual studio , firebird? ?
also, make sure datatype have in db , in mapping. same? (for example, both non-nullable) ?
otherwise, may bug in nhibernate itself. best solution upgrading nhibernate 3.0 (or better offf latest trunk version, don't worry, stable). if still bug, make jira issue in there , may fixed quick.
Comments
Post a Comment