Page 1 of 1

Problem with 8.1.65, EF6 and TimeStamp with Timezone default values

Posted: Fri 10 Jan 2014 09:51
by JacekM
Using code-first migration with adding new column of type: timestamp with timezone

Code: Select all

AddColumn("dbo.RELATION_GROUP", "END_TIMESTAMP", c => c.DateTimeOffset(nullable: false));
generates script with invalid default value like this:

Code: Select all

ALTER TABLE ICO_RELATION_GROUP
ADD END_TIMESTAMP TIMESTAMP(7) WITH TIME ZONE DEFAULT TO_TIMESTAMP_TZ('1900-01-01 00:00:00.0000000 +00:00', 'yyyy-mm-dd HH24:MI:SS.FF3 TZH:TZM') NOT NULL
As you can see there is an invalid fractional digits (FF3) instead of FF7

Further changing the precision to 3

Code: Select all

AddColumn("dbo.RELATION_GROUP", "END_TIMESTAMP", c => c.DateTimeOffset(nullable: false, precision: 3));
is causing generation of another invalid script:

Code: Select all

ALTER TABLE ICO_RELATION_GROUP
ADD END_TIMESTAMP TIMESTAMP(3) WITH TIME ZONE DEFAULT TO_TIMESTAMP_TZ('1900-01-01 00:00:00.0000000 +00:00', 'yyyy-mm-dd HH24:MI:SS.FF3 TZH:TZM') NOT NULL
In this case is the "count of zeros" still 7.

We are working with Oracle 12c and Entity Framework 6.
Version 8.1.55 is working (no default values)

The resulting Oracle error is
ORA-01830: date format picture ends before converting entire input string

Re: Problem with 8.1.65, EF6 and TimeStamp with Timezone default values

Posted: Sat 11 Jan 2014 14:56
by Shalex
Thank you for your report. We have reproduced the problem and are investigating it. We will notify you about the result.

Re: Problem with 8.1.65, EF6 and TimeStamp with Timezone default values

Posted: Wed 15 Jan 2014 15:05
by Shalex
The bug with generation of SQL literals for DateTimeOffset values is fixed. We will notify you when the corresponding build of dotConnect for Oracle is available for download.

Re: Problem with 8.1.65, EF6 and TimeStamp with Timezone default values

Posted: Thu 16 Jan 2014 15:21
by Shalex
New version of dotConnect for Oracle 8.2 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/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=1&t=28734.