Canonical Functions - EntityFunctions.TruncateTime

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
rick.duarte
Posts: 35
Joined: Fri 23 Jan 2009 23:07
Location: Rio de Janeiro, Brazil

Canonical Functions - EntityFunctions.TruncateTime

Post by rick.duarte » Fri 26 Nov 2010 15:24

I'm trying to execute a query that uses a canonincal function EntityFunctions.TruncateTime and I'm getting an error ORA-00904.

Here is the Linq:

Code: Select all

var logoffs = from off in ctxSiebel.DbaAuditTrails
              where off.Timestamp >= semana.DtInicioSemana
              && EntityFunctions.TruncateTime(off.Timestamp) = :p__linq__0) AND ((TruncateTime("Extent1".TIMESTAMP)) <= :p__linq__1)
	GROUP BY "Extent1".TIMESTAMP
)  "GroupBy1"
I'm using version: 5.70.190.
What is worng? Canonical functions are not supported?

Best Regards,

Henrique

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 26 Nov 2010 17:24

Use the following code instead:

Code: Select all

var logoffs = from off in ctxSiebel.DbaAuditTrails 
              where off.Timestamp >= semana.DtInicioSemana 
              && Devart.Data.Oracle.Entity.OracleFunctions.Trunc(off.Timestamp) <= semana.DtFimSemana 
              group off by off.Timestamp into g 
              select new db.MonitoramentoLogin 
              { 
                  DtColeta = g.Key, 
                  NrLogoff = g.Count() 
              };
Please note that you need to add a reference to the Devart.Data.Oacle.Entity.dll assembly to your project.

rick.duarte
Posts: 35
Joined: Fri 23 Jan 2009 23:07
Location: Rio de Janeiro, Brazil

Post by rick.duarte » Fri 26 Nov 2010 19:19

Thanks!

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 24 Jan 2011 16:43

We have fixed the problem, the initial syntax will be working in the nearest build as well.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 18 Feb 2011 10:46

We have released a new 6.10.103 build of dotConnect for Oracle.
It can be downloaded from this page (Trial Edition) or from Registered Users' Area (non-Trial Editions).

Post Reply