Problem with DbFunctions.TruncateTime

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
luizg
Posts: 5
Joined: Mon 15 Jul 2019 00:48

Problem with DbFunctions.TruncateTime

Post by luizg » Mon 15 Jul 2019 00:50

Hello everyone,

I have a project in Entity Framework and PostgreSQL, currently it runs with Npgsql, but I'm having some problems with it and would like to test and switch to Devart.

I made the exchange, but at the moment I have a problem:
When using the "DbFunctions.TruncateTime" function I am getting the following error: "function date_trunc (unknown, unknown) is not unique". The generated SQL looks like this:
"SELECT *
   FROM public.meta AS "Extent1"
where DATE_TRUNC ('day', "Extent1.")> = DATE_TRUNC ('day',: p__linq__1) "
By manually placing :: timestamp in the parameter, the query works.

This database was generated via migrations by Npgsql, the date column is of type "timestamp without timezone".

Can someone help me?

luizg
Posts: 5
Joined: Mon 15 Jul 2019 00:48

Re: Problem with DbFunctions.TruncateTime

Post by luizg » Tue 16 Jul 2019 00:05

No one?

Devart team? I would like to exchange the provider.

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

Re: Problem with DbFunctions.TruncateTime

Post by Shalex » Tue 16 Jul 2019 18:43

We have reproduced the issue and will notify you when it is fixed.

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

Re: Problem with DbFunctions.TruncateTime

Post by Shalex » Thu 25 Jul 2019 14:08

The bug with using DbFunctions.TruncateTime in EF6 is fixed: viewtopic.php?f=3&t=39079.

luizg
Posts: 5
Joined: Mon 15 Jul 2019 00:48

Re: Problem with DbFunctions.TruncateTime

Post by luizg » Sat 27 Jul 2019 17:38

Hello,

Now I have the same problem, but in another function:

function pg_catalog.date_part(unknown, unknown) is not unique

Can you fix this one too?

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

Re: Problem with DbFunctions.TruncateTime

Post by Shalex » Mon 29 Jul 2019 14:18

Thank you for your report. We will notify you when the bug is fixed.

luizg
Posts: 5
Joined: Mon 15 Jul 2019 00:48

Re: Problem with DbFunctions.TruncateTime

Post by luizg » Fri 06 Sep 2019 02:00

Any news about this issue?

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

Re: Problem with DbFunctions.TruncateTime

Post by Shalex » Fri 06 Sep 2019 17:10

The issue is fixed. We are planning to release the new public build next week.

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

Re: Problem with DbFunctions.TruncateTime

Post by Shalex » Sat 14 Sep 2019 13:17

The bug with casting the DateTimeOffset value passed to a function as an argument in EF6 is fixed: viewtopic.php?f=3&t=39339.

luizg
Posts: 5
Joined: Mon 15 Jul 2019 00:48

Re: Problem with DbFunctions.TruncateTime

Post by luizg » Tue 24 Sep 2019 00:19

Good night, my trial period has expired, can you extend it so I can continue my tests with the new version?

Thanks.

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

Re: Problem with DbFunctions.TruncateTime

Post by Shalex » Tue 24 Sep 2019 12:51

luizg wrote:
Tue 24 Sep 2019 00:19
Good night, my trial period has expired, can you extend it so I can continue my tests with the new version?
We have sent the extended trial to your email.

Post Reply