All, I've been trying to track down a bug where milliseconds are not correctly saved. NH-1973 is the test case to prove my issue.
I've tried to come up with a patch but I only looked at the NH codebase for the first time this week, so am unsure how it all hangs together. However, I notice that the SQL DateTime2 maps to the NHibernate.Type.DateTime2. This inherits from the normal DateTimeType. This class has Get and Set method (that I assume is used to get and write values to the database). These only work up to Second (millseconds are dropped)..... which would explain the behaviour i'm seeing (i.e. milliseconds sent to the database as .000 instead of (e.g.) .489). Therefore I'm guessing that the NHibernate.Type.DateTime2 class should override the Get and Set methods of NHibernate.Type.DateTime to also use the millseconds. For those who understand NH dialects better than me, does this sound right? I don't really know how to submit a code file patch (don't use SVC or really understand how to hook into the internet based source control system) but can this be looked at and patched by a committer if I'm right? Especially for NH 2.1.1? Thanks
