That is true.
Please add a new JIRA ticket to add SetDateTime2, SetTimeSpan and so on to
HQL, Criteria and QueryOver.
Please do it ASAP and perhaps I'll not forget it for NH3Beta2

On Fri, Oct 15, 2010 at 7:04 PM, Chris J <[email protected]> wrote:

>
> Yes, of course, but one would think that either SetDateTime would also
> work for a datetime2 field, or there would be a SetDateTime2 method,
> since it is a distinct NHibernate field type. It is certainly not
> intuitive to use SetTimestamp for a datetime2 field.
>
>
> On Oct 15, 1:16 pm, Fabio Maulo <[email protected]> wrote:
> > b) for sure... we have various Setxyz for something ;)
> >
> >
> >
> > On Fri, Oct 15, 2010 at 4:03 PM, Chris J <[email protected]> wrote:
> >
> > > I was not able to get Timestamp to work, but it may have been
> > > complicated by the fact that one of the mappings was for a stored
> > > procedure call. I was able to get the stored procedure call to work by
> > > a) changing the stored proc to accept datetime2 instead of datetime,
> > > and b) using SetTimestamp to set the date parameters on the query
> > > instead of SetDateTime. If I used SetDateTime, the proc call did not
> > > include milliseconds.
> >
> > > On Oct 14, 12:16 am, Jason Dentler <[email protected]> wrote:
> > > > NH's Timestamp doesn't truncate or round off. It is as accurate as
> your
> > > SQL
> > > > data type will allow. DateTime2 has a better resolution than
> DateTime.
> >
> > > > On Wed, Oct 13, 2010 at 6:57 PM, Fabio Maulo <[email protected]>
> > > wrote:
> > > > > According MsSql documentation it will work perhaps.
> > > > > If you have MsSql2008 and you use datetime2 then it will work for
> sure.
> >
> > > > > --
> > > > > Fabio Maulo
> >
> > > > > El 13/10/2010, a las 16:49, Chris J <[email protected]>
> escribió:
> >
> > > > > > Thanks Fabio. If I understand correctly, using Timestamp isn't
> > > enough,
> > > > > > because it will still truncate milliseconds, but if I use
> Timestamp
> > > > > > AND override TimestampResolutionInTicks to accommodate MsSQL
> Server
> > > > > > resolution, that will work?
> >
> > > > > > On Oct 13, 10:36 am, Fabio Maulo <[email protected]> wrote:
> > > > > >> ah... and you have to be aware that MsSQL server DateTime
> resolution
> > > is
> > > > > >> actually 3.33 ms
> >
> > > > > >> On Wed, Oct 13, 2010 at 1:34 PM, Fabio Maulo <
> [email protected]>
> > > > > wrote:
> > > > > >>> You have to use type="Timestamp".
> > > > > >>> If you don't like the round done by default you have to
> override
> > > > > >>> YourDialect.TimestampResolutionInTicks
> >
> > > > > >>> On Wed, Oct 13, 2010 at 12:58 PM, Chris J <[email protected]
> >
> > > wrote:
> >
> > > > > >>>> Thank you Nexus. I have seen this blog posting, but it is not
> very
> > > > > >>>> helpful. The grid in the posting indicates that a .NET
> DateTime
> > > field
> > > > > >>>> maps to a SQL Server datetime column. While this is true, the
> > > > > >>>> milliseconds of a DateTime value are not maintained when
> written
> > > to
> > > > > >>>> the database. See this defect:
> > >http://216.121.112.228/browse/NH-1973.
> >
> > > > > >>>> On Oct 13, 4:13 am, Nexus <[email protected]> wrote:
> > > > > >>>>> Chris
> >
> > > > > >>>>> Please take a look at following blog article, should answer
> your
> > > > > >>>>> question :)
> >
> > > > >
> http://nhforge.org/blogs/nhibernate/archive/2009/03/11/nhibernate-and.
> > > > > >>>> ..
> >
> > > > > >>>>> Kind regards
> >
> > > > > >>>> --
> > > > > >>>> 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]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> > > <nhusers%[email protected]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> >
> > > > > <nhusers%[email protected]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> > > <nhusers%[email protected]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> >
> > > > > >>>> .
> > > > > >>>> For more options, visit this group at
> > > > > >>>>http://groups.google.com/group/nhusers?hl=en.
> >
> > > > > >>> --
> > > > > >>> Fabio Maulo
> >
> > > > > >> --
> > > > > >> Fabio Maulo
> >
> > > > > > --
> > > > > > 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]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> > > <nhusers%[email protected]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> >
> > > > > .
> > > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/nhusers?hl=en.
> >
> > > > > --
> > > > > 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]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> > > <nhusers%[email protected]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> >
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/nhusers?hl=en.
> >
> > > --
> > > 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]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/nhusers?hl=en.
> >
> > --
> > Fabio Maulo
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>


-- 
Fabio Maulo

-- 
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