Give this a shot:

http://nhforge.org/blogs/nhibernate/archive/2009/03/11/nhibernate-and-ms-sql-server-2008-date-time-datetime2-and-datetimeoffset.aspx

For AutoMapping, you can write a IPropertyConvention that either looks for
the TimeSpans or specific property names and set the sql type (per that web
post).  When I get to a PC, I'll grab the code where we used that and post
it up for ref.
<http://nhforge.org/blogs/nhibernate/archive/2009/03/11/nhibernate-and-ms-sql-server-2008-date-time-datetime2-and-datetimeoffset.aspx>
---
David R. Longnecker
blog: http://blog.drlongnecker.com
twitter: dlongnecker


On Fri, Feb 19, 2010 at 8:57 AM, Marnheus <marnh...@gmail.com> wrote:

> I have the same kind of problem, if you have found a solution, I'd
> love to hear about it
>
> On Jan 12, 8:34 pm, michaeloutwest <mich...@michaelcraig.net> wrote:
> > What is the best auto-mappable way to storeTimevalues in the
> > database?
> >
> > I'm currently trying a TimeSpan on the entity, and atime(7) in my Sql
> > Server 2008 database, and am getting a "null pointer" error when I try
> > to insert a new record, and some sort of parsing error trying to read
> > from the DB (I had existing data before migrating to FNH).
> >
> > I'm using NHibernate 2.1.2 GA and Fluent 1.0 RTM.
> >
> > Many thanks in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To post to this group, send email to fluent-nhibern...@googlegroups.com.
> To unsubscribe from this group, send email to
> fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to