.Count() bug with ODP.NET

Posts   
 
    
oribolzi
User
Posts: 1
Joined: 20-May-2008
# Posted on: 20-May-2008 05:58:48   

Using ODP.NET the return type of "SELECT COUNT(*) ..." is decimal, not integer. So, using linq Count() function throw a conversion exception in

Projection\DataProjectorToValueList.cs

at

_destination.Add((T)valueToSet);

where T is long or int and valueToSet is ((object) decimal)

Thanks, Onorio

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39872
Joined: 17-Aug-2003
# Posted on: 20-May-2008 08:33:02   

Hmm...

The thing is that the end-result has to be an int, as the type expected from Count() in C#/VB.NET is int. I'll see what I can do.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39872
Joined: 17-Aug-2003
# Posted on: 20-May-2008 12:10:19   

Reproduced. I'll see if I can wrap it into a cast to int. (or more in general: add a cast/convert to the .NET type for all aggregate functions)

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39872
Joined: 17-Aug-2003
# Posted on: 20-May-2008 15:21:34   

Fixed in next build!

Frans Bouma | Lead developer LLBLGen Pro