开发者

NHibernate support for TIMESTAMP with TIMEZONE type in Oracle

开发者 https://www.devze.com 2023-03-14 16:27 出处:网络
Is it possible to map a .Net DateTime to a TIMESTAMP with TIMEZONE type in Oracle using NHibernate? Looks like it\'s not readily available in \"Hibernate\"

Is it possible to map a .Net DateTime to a TIMESTAMP with TIMEZONE type in Oracle using NHibernate? Looks like it's not readily available in "Hibernate"

If this is not available out of 开发者_运维百科the box, can someone please direct to examples of how it may be achieved.


We were not able to find a proper mapping to this using NHb 3.1. However extended support for times (including timezone etc...) is available for SQL Server '07 onwards.

Our solution was to use a varchar field instead of timestamp and format the dates to include the timezone information. The consumer of this data was able to handle this change accordingly.


You could also convert them to UTC and store that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号