I'm not sure if I'm doing something wrong here. Looking around the forum, it seems clear that the dotConnect for PostgreSQL data provider supports mapping the TimestampTZ data type to DateTimeOffset when using a data reader (http://forums.devart.com/viewtopic.php? ... set#p89627) and it seems that LinqConnect supports DateTimeOffset, at least for the SQL Server provider (http://forums.devart.com/viewtopic.php? ... set#p87310). So it seems that I should be able to map a TimestampTZ column to a DateTimeOffset entity property, but when I do I get a NotSupportException thrown, with the message: 'Cannot use "timestamp(6)" type value in "DateTimeOffset" type argument.'
I used Entity Developer to generate the model from my database, which it has done a great job. I manually changed the property type to DateTimeOffset, and the server data type is correctly set to TimestampTZ. If I leave it mapped to DateTime, it works fine, but of course I don't have any timezone info. All in all, I am really enjoying my experience with dotConnect for PostgreSQL, but I'm not sure what I'm doing wrong here.
I'm having a similar issue with JSON data types, but getting an InvalidOperationException instead, with the message: "Invalid datatype: JSON"
With the JSON column, I mapped it to a string property, which may be wrong... Again, it seems that JSON is a supported data type for at least the SQL Server provider.
If you need any further details from me, I'll reply as soon as I can.
Thanks
PostgreSQL TimestampTZ mapped to DateTimeOffset
-
- Posts: 13
- Joined: Fri 03 Jan 2014 11:13
Re: PostgreSQL TimestampTZ mapped to DateTimeOffset
Thank you for the report on this. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.'Cannot use "timestamp(6)" type value in "DateTimeOffset" type argument.'
Currently, it is not supported in LinqConnect. This functionality is on our roadmap. We will inform you when any results are available.I'm having a similar issue with JSON data types, but getting an InvalidOperationException instead, with the message: "Invalid datatype: JSON"
Re: PostgreSQL TimestampTZ mapped to DateTimeOffset
The bug related to the "Cannot use "timestamp(6)" type value in "DateTimeOffset" type argument" error is fixed.
New build of LinqConnect 4.4.453 is available!
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=29103.
New build of LinqConnect 4.4.453 is available!
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=29103.
Re: PostgreSQL TimestampTZ mapped to DateTimeOffset
The JSON data type is supported and available in new build of LinqConnect 4.4.463!
New build can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=29244.
New build can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=29244.