1

Closed

Calling GroupBy without specifying group limit parameter throws a CamlexNET.NonSupportedExpressionException.

description

I use Camlex 3.2 and cannot call GroupBy without specifying group limit. The following code throws an exception of type CamlexNET.NonSupportedExpressionException:

Camlex.Query().GroupBy(x => new[] { x["SomeField"] }, true);
Closed Dec 15, 2012 at 7:28 PM by sadomovalex

comments

sadomovalex wrote Dec 15, 2012 at 7:28 PM

hi Sever,
the method which you try to use has the following signature:
IQuery GroupBy(Expression<Func<SPListItem, object>> expr, bool? collapse);
i.e. new array initializer is not needed:
Camlex.Query().GroupBy(x => x["SomeField"] , true);
The problem is that compiler also may cast array, which you passed to the GroupBy method, to object and doesn't show any warning.