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?