Hi,
I'm facing a problem when using AddSecond with devArt provider & EntityFramework
Table DDL:
CREATE TABLE IF NOT EXISTS TOTO (
TOTOID SERIAL NOT NULL,
ATTRIBUTE_2 TIMESTAMP,
ATTRIBUTE_3 TIMESTAMP WITH TIME ZONE,
CONSTRAINT PK_TOTO PRIMARY KEY (TOTOID)
);
The Linq query used :
var rows = model.toto.Where(t => t.ATTRIBUTE_2 >= localTime && t.ATTRIBUTE_2 < DbFunctions.AddSeconds(localTime, 1));
The sql generated:
SELECT
"Extent1".totoid,
"Extent1".attribute_2,
"Extent1".attribute_3
FROM toto AS "Extent1"
WHERE ("Extent1".attribute_2 >= :p__linq__0) AND ("Extent1".attribute_2 < ((:p__linq__1 + INTERVAL '1 SECONDS')))
-- p__linq__0: '19/11/2014 10:38:08' (Type = DateTime, IsNullable = false)
-- p__linq__1: '19/11/2014 10:38:08' (Type = DateTime, IsNullable = false)
My version is dcpostgresql 7.3.171.0 pro.
If i remove the call to the Addfunction to replace it with the datetime computed, the query goes fine.
Thanks for any help
Cedric Connes
DbFunctions.AddSeconds throws {Error: 42883: operator does not exist: timestamp without time zone < interval}
Re: DbFunctions.AddSeconds throws {Error: 42883: operator does not exist: timestamp without time zone < interval}
Thank you for your report. We have reproduced the issue and are investigating it.
Re: DbFunctions.AddSeconds throws {Error: 42883: operator does not exist: timestamp without time zone < interval}
The bug is fixed in the current (7.3.303) build of dotConnect for PostgreSQL.