SetAggregateFunction( AggregateFunction.Count ) on Guid

Posts   
 
    
tzarger
User
Posts: 87
Joined: 14-Jun-2007
# Posted on: 05-Sep-2007 09:24:49   

Using adapter, v2.5 ...

This throws an error of cannot convert int32 to Guid ... the PaymentProcessorID is a Guid:

groupBy.HavingClause = new PredicateExpression( UserPaymentProcessorFields.PaymentProcessorID.SetAggregateFunction( AggregateFunction.Count ) < 2 );

The SQL generated looks perfect, however since the < 2 is an int and the counted column is a Guid, I guess it is trying to convert the 2 to the counted Guid column...

So with that in mind, how would I do this count on a Guid column?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 05-Sep-2007 10:35:16   

Please post the following: 1- LLBLGenPro runtime library version. 2- The required SQL Query. 3- The generated SQL query. 4- The exact exception text. 5- The stack trace. (ref: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7717)