Mapping DateTimeOffset to TIMESTAMP WITH TIME ZONE in Oracle & NHibernate

回眸只為那壹抹淺笑 提交于 2019-12-22 10:58:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!