Problem with 8.1.65, EF6 and TimeStamp with Timezone default values

Problem with 8.1.65, EF6 and TimeStamp with Timezone default values

Postby JacekM » Fri 10 Jan 2014 09:51

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
JacekM
 
Posts: 1
Joined: Fri 10 Jan 2014 09:37

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

Postby Shalex » Sat 11 Jan 2014 14:56

Thank you for your report. We have reproduced the problem and are investigating it. We will notify you about the result.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

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

Postby Shalex » Wed 15 Jan 2014 15:05

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.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

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

Postby Shalex » Thu 16 Jan 2014 15:21

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.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle