问题
I can't make NHibernate successfully map the native oracle "TIMESTAMP WITH TIME ZONE" type to the CLR DateTimeOffset type.
It seems that Oracle chose to completely ignore the native DateTimeOffset type and is using their own proprietary type (OracleTimeStampTZ) in their ADO.NET provider. Since NHibernate is using native CLR types (like the DateTimeOffset type) - the Oracle ADO.NET provider fails any attempt to insert a row with such a type.
Do any of you have an idea how this issue can be solved ? I have to use the DateTimeOffset type since I need to record the timezone/daylight-saving offset in addition to the UTC value. The standard DateTime mapping won't cut it for me unfortunately.
Thanks in advance
Liron
来源:https://stackoverflow.com/questions/9471940/mapping-datetimeoffset-to-timestamp-with-time-zone-in-oracle-nhibernate