Page 1 of 1

TIMESTAMP Precision axed

Posted: Fri 05 Jul 2013 21:32
by Alladin
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

Re: TIMESTAMP Precision axed

Posted: Mon 08 Jul 2013 12:10
by Shalex
Could you please send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment?

Re: TIMESTAMP Precision axed

Posted: Thu 18 Jul 2013 11:36
by Alladin
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?

Re: TIMESTAMP Precision axed

Posted: Tue 23 Jul 2013 08:35
by Shalex
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.

Re: TIMESTAMP Precision axed

Posted: Mon 29 Jul 2013 20:57
by Alladin
I've upgraded dotConnect, replaced WCF OData endpoints with custom ones, simplified queries - now everything works as expected.