Hi, 

I've got following setup: 

- NHibernate 3.3.0, C# app, .Net 4.0
- MS SQL 2088 R2 database
- table with column LastModified of MSSQL type DateTime2
- field LastModified in C# class of .NET type DateTime mapped in nhibernate 
as type="Timestamp"
- I use custom dialect (inheriting from MsSql2008Dialect) and override 
TimestampResolutionInTicks 
property, returning 1 (so no rounding should take place, see e.g. this 
post<https://groups.google.com/forum/#!topic/nhusers/mfu6i6qkrlU>
)

Unfortunately, I still can see that milliseconds are rounded so i can't get 
1 ms precision working. 
What is interesting, when I change the type="Timestamp" to type="DateTime2"(in 
nhibernate mapping) then 1 ms precision works fine. 

Is there a way to force "Timestamp" type to work correctly in my case? I 
would like to have mapping ready to be used also on Oracle so I would 
preffer to map the field as Timestamp, not DateTime2. 
I know I can add mapping of nhibernate's DateTime2 type to Oracle's TIMESTAMP 
type in custom Oracle dialect, but this sounds like a workaround. 

greetings
Bartek 


-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to