TIMESTAMP Precision axed

TIMESTAMP Precision axed

Postby Alladin » Fri 05 Jul 2013 21:32

Hi there,

I have a simple TIMESTAMP column. EF and Oracle can successfully roundtrip fractions of the seconds. However, if I use my TIMESTAMP column in queries, generated SQL looks dead wrong.

Timestamp columns are filled with SysTimeStamp Oracle function by default, so yes, these values are real.

Here is an example:

SELECT ....
FROM TINDEXES "Extent1"
WHERE "Extent1".TS > TO_TIMESTAMP('2013-06-29 20:14:58.7230000', 'yyyy-mm-dd hh24:mi:ss.ff')
ORDER BY "Extent1".ID ASC

Obviously fractions of seconds get axed, so business logic fails.

Where can one configure the precision of this 'yyyy-mm-dd hh24:mi:ss.ff' format?

EF4/.NET 4/Oracle 11G R2

Thank you in advance,
Lex
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Re: TIMESTAMP Precision axed

Postby Shalex » Mon 08 Jul 2013 12:10

Could you please send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment?
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Re: TIMESTAMP Precision axed

Postby Alladin » Thu 18 Jul 2013 11:36

CREATE TABLE BLA (TS TIMESTAMP)

Some model for this table (DateTime column for TS)

var ts = DateTime.Now;

from bla in context.Blas where bla.Ts > ts select bla;

See resulting SQL:

SELECT
...
WHERE t.TS > TO_TIMESTAMP('2013-07-18 13:35:23.7230000', 'yyyy-mm-dd hh24:mi:ss.ff')

Where does DateTime format 'yyyy-mm-dd hh24:mi:ss.ff' come from? Is it hard coded?
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Re: TIMESTAMP Precision axed

Postby Shalex » Tue 23 Jul 2013 08:35

Alladin wrote:SELECT
...
WHERE t.TS > TO_TIMESTAMP('2013-07-18 13:35:23.7230000', 'yyyy-mm-dd hh24:mi:ss.ff')

We cannot reproduce the generation of such SQL. Please send us a small test project.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Re: TIMESTAMP Precision axed

Postby Alladin » Mon 29 Jul 2013 20:57

I've upgraded dotConnect, replaced WCF OData endpoints with custom ones, simplified queries - now everything works as expected.
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18


Return to dotConnect for Oracle