TIMESTAMP Precision axed

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

TIMESTAMP Precision axed

Post by 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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: TIMESTAMP Precision axed

Post by 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?

Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

Re: TIMESTAMP Precision axed

Post by 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?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: TIMESTAMP Precision axed

Post by 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.

Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

Re: TIMESTAMP Precision axed

Post by 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.

Post Reply