I don't understand quite what you are trying to do, but I can explain the
overflow exception

if you have a nullable date column then NHibernate will put in the min date
to a non-nullable date variable.  Unfortunately NHibernate and the database
disagree on what is the min date, so when its written back, you get the
overflow exception.

This link explained it best for me:
http://blog.jagregory.com/2007/12/18/nhibernate-and-the-sqltypeexception/

the easiest solution is to either make your column non-null in the db, or
define your data classes with DateTime? instead of DateTime.

FP

2009/10/5 Noam <[email protected]>

>
> Hi,
> When i am using partial update for DateTime field, NHibernate try to
> save the default time. The behavior i am looking for is to skip this
> field when saving it.
>
> i am getting "SqlDateTime overflow" exception.
>
> i dont want o use nullable datetime just to skip this field if i dont
> set it to any value.
>
> Is this a bug?
>
> Noam
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to